CMS 3D CMS Logo

Functions
Matriplex::internal Namespace Reference

Functions

template<typename T >
void sincos4 (const T x, T &sin, T &cos)
 

Function Documentation

◆ sincos4()

template<typename T >
void Matriplex::internal::sincos4 ( const T  x,
T sin,
T cos 
)

Definition at line 104 of file MatriplexCommon.h.

References Matriplex::cos(), Matriplex::sin(), and x.

Referenced by Matriplex::__attribute__().

104  {
105  // Had this writen with explicit division by factorial.
106  // The *whole* fitting test ran like 2.5% slower on MIC, sigh.
107 
108  const T x2 = x * x;
109  cos = T(1.0) - T(0.5) * x2 + T(0.0416666666666666667) * x2 * x2;
110  sin = x - T(0.166666666666666667) * x * x2;
111  }
Sin< T >::type sin(const T &t)
Definition: Sin.h:22
Cos< T >::type cos(const T &t)
Definition: Cos.h:22
float x
long double T