31 #ifndef SINCOS_COMMON_H_ 32 #define SINCOS_COMMON_H_ 40 const double DP1sc = 7.85398125648498535156E-1;
41 const double DP2sc = 3.77489470793079817668E-8;
42 const double DP3sc = 2.69515142907905952645E-15;
44 const double C1sin = 1.58962301576546568060E-10;
45 const double C2sin =-2.50507477628578072866E-8;
46 const double C3sin = 2.75573136213857245213E-6;
47 const double C4sin =-1.98412698295895385996E-4;
48 const double C5sin = 8.33333333332211858878E-3;
49 const double C6sin =-1.66666666666666307295E-1;
51 const double C1cos =-1.13585365213876817300E-11;
52 const double C2cos = 2.08757008419747316778E-9;
53 const double C3cos =-2.75573141792967388112E-7;
54 const double C4cos = 2.48015872888517045348E-5;
55 const double C5cos =-1.38888888888730564116E-3;
56 const double C6cos = 4.16666666666665929218E-2;
58 const double DP1 = 7.853981554508209228515625E-1;
59 const double DP2 = 7.94662735614792836714E-9;
60 const double DP3 = 3.06161699786838294307E-17;
64 const float DP1F = 0.78515625;
65 const float DP2F = 2.4187564849853515625e-4;
66 const float DP3F = 3.77489497744594108e-8;
111 quad = (quad+1) & (~1);
112 const double y = double (quad);
114 return ((x - y * DP1) - y * DP2) - y *
DP3;
137 const double signS = (j&4);
141 const double signC = (j&4);
142 const double poly = j&2;
148 const double tmp =
c;
174 quad = (quad+1) & (~1);
175 const float y = float(quad);
191 s = (((-1.9515295891E-4
f * z
192 + 8.3321608736E-3
f) * z
193 - 1.6666654611
E-1
f) * z *
x)
196 c = (( 2.443315711809948E-005
f * z
197 - 1.388731625493765E-003
f) * z
198 + 4.166664568298827
E-002
f) * z * z
216 const int signC = (j&4);
217 const int poly = j&2;
224 const float tmp = lc;
228 if(signC == 0) lc = -lc;
229 if(signS != 0) ls = -ls;
double reduce2quadrant(double x, int32_t &quad)
Reduce to 0 to 45.
double get_sin_px(const double x)
void fast_sincos(const double xx, double &s, double &c)
Double precision sincos.
double get_cos_px(const double x)
void fast_sincos_m45_45(const double z, double &s, double &c)
Sincos only for -45deg < x < 45deg.
void fast_sincosf_m45_45(const float x, float &s, float &c)
Sincos only for -45deg < x < 45deg.
VecExpr< UnaryOp< Fabs< T >, VecExpr< A, T, D >, T >, T, D > fabs(const VecExpr< A, T, D > &rhs)
void fast_sincosf(const float xx, float &s, float &c)
Single precision sincos.
you should not use this method at all Int_t Int_t z