MCPcopy Create free account
hub / github.com/AcademySoftwareFoundation/OpenColorIO / sseCos

Function sseCos

src/OpenColorIO/SSE.h:595–600  ·  view source on GitHub ↗

Cosine function Algorithm Explanation: The function cos() is evaluated by reducing the argument to the domain [-pi/2,pi/2] and then using Chebyshev polynomials to evaluate the function over the restricted range. The sign of the result is then adjusted if the (reduced) input value is on quadrants 2 or 3. This approximation is accurate to 17 bits of mantissa. - x the input angle Return the cosine o

Source from the content-addressed store, hash-verified

593// - x the input angle
594// Return the cosine of the angle
595inline __m128 sseCos(const __m128 x)
596{
597 __m128 cos_x, xr, xr2, flip_sign_cos_x;
598 __sse_cos__(x, cos_x, xr, xr2, flip_sign_cos_x);
599 return cos_x;
600}
601
602// Sine function
603//

Callers 3

sseSinFunction · 0.85
sseSinCosFunction · 0.85
EvaluateCosFunction · 0.85

Calls 1

__sse_cos__Function · 0.85

Tested by 1

EvaluateCosFunction · 0.68