Query: __sinpif
OS: osx
Section: 3
Format: Original Unix Latex Style Formatted with HTML and a Horizontal Scroll Bar
__SINPI(3) BSD Library Functions Manual __SINPI(3)NAME__sinpi -- sine-pi functionSYNOPSIS#include <math.h> float __sinpif(float x); double __sinpi(double x);DESCRIPTIONThe __sinpi() function returns the sine of pi times x (measured in radians). This can be computed more accurately than sin(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 sin(M_PI * x / 180.0) cannot produce exact results for angles that naively "should" be exact, like 180 degrees, __sinpi(x / 180.0) can be computed exactly.SPECIAL VALUES__sinpi(-x) is the same as - __sinpi(x) for any finite x. __sinpi(+-0) returns +-0. __sinpi(n) returns +0 for any positive integer n. __sinpi(n + 0.5) returns +1 for any even integer n. __sinpi(n + 0.5) returns -1 for any odd integer n. __sinpi(+-infinity) raises the invalid floating-point exception and returns NaN.VECTOR OPERATIONSIf you need to apply the __sinpi() function to SIMD vectors or arrays, using the following functions provided by the Accelerate.framework may be useful: #include <Accelerate/Accelerate.h> vFloat vsinpif(vFloat x); void vvsinpif(float *y, float *x, const int n); void vvsinpi(double *y, double *x, const int n);SEE ALSO__cospi(3), __tanpi(3), __sincospi(3), math(3)BSDDecember 15, 2012 BSD
Related Man Pages |
---|
__cospi(3) - mojave |
__cospif(3) - mojave |
__tanpi(3) - mojave |
__cospi(3) - osx |
__tanpif(3) - osx |
Similar Topics in the Unix Linux Community |
---|
Universal SIMD Mathlibrary 1 (Default branch) |
Comparing Negative #'s in IF Statements |
Formatting Help needed(Sed) |
[solved] Error Executing the script. |