Query: __tanpi
OS: osx
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
__TANPI(3) BSD Library Functions Manual __TANPI(3)NAME__tanpi -- tangent-pi functionSYNOPSIS#include <math.h> float __tanpif(float x); double __tanpi(double x);DESCRIPTIONThe __tanpi() function returns the tangent of pi times x (measured in radians). This can be computed more accurately than tan(M_PI * x), because it can implicitly use as many bits of pi as are necessary to deliver a well-rounded result, instead of the 53-bits to which M_PI is limited. For large x it may also be more efficient, as the argument reduction involved is significantly simpler. This function may be especially useful for working with degrees; whereas tan(M_PI * x / 180.0) cannot produce exact results for angles that naively "should" be exact, like 90 degrees, __tanpi(x / 180.0) can be computed exactly.SPECIAL VALUES__tanpi(-x) is the same as - __tanpi(x) for any finite x. __tanpi(+-0) returns +-0. __tanpi(n) returns +0 for any positive even integer n. __tanpi(n) returns -0 for any positive odd integer n. __tanpi(n + 0.5) returns +infinity for any even integer n. __tanpi(n + 0.5) returns -infinity for any odd integer n. __tanpi(+-infinity) raises the invalid floating-point exception and returns NaN.VECTOR OPERATIONSIf you need to apply the __tanpi() function to SIMD vectors or arrays, using the following functions provided by the Accelerate.framework may be useful: #include <Accelerate/Accelerate.h> vFloat vtanpif(vFloat x); void vvtanpif(float *y, float *x, const int n); void vvtanpi(double *y, double *x, const int n);SEE ALSO__cospi(3), __sinpi(3), __sincospi(3), math(3)BSDDecember 15, 2012 BSD
Related Man Pages |
---|
__sinpif(3) - mojave |
__cospi(3) - osx |
__cospif(3) - osx |
__tanpi(3) - osx |
__tanpif(3) - osx |