Logo ROOT   6.08/07
Reference Guide
cos.h
Go to the documentation of this file.
1 /*
2  * cos.h
3  * The basic idea is to exploit Pade polynomials.
4  * A lot of ideas were inspired by the cephes math library (by Stephen L. Moshier
5  * moshier@na-net.ornl.gov) as well as actual code.
6  * The Cephes library can be found here: http://www.netlib.org/cephes/
7  *
8  * Created on: Jun 23, 2012
9  * Author: Danilo Piparo, Thomas Hauth, Vincenzo Innocente
10  */
11 
12 #ifndef COS_H_
13 #define COS_H_
14 
15 #include "sincos.h"
16 
17 namespace vdt{
18 
19 // Cos double precision --------------------------------------------------------
20 
21 /// Double precision cosine: just call sincos.
22 inline double fast_cos(double x){double s,c;fast_sincos(x,s,c);return c;}
23 
24 //------------------------------------------------------------------------------
25 
26 inline float fast_cosf(float x){float s,c;fast_sincosf(x,s,c);return c;}
27 
28 //------------------------------------------------------------------------------
29 // void cosv(const uint32_t size, double const * __restrict__ iarray, double* __restrict__ oarray);
30 // void fast_cosv(const uint32_t size, double const * __restrict__ iarray, double* __restrict__ oarray);
31 // void cosfv(const uint32_t size, float const * __restrict__ iarray, float* __restrict__ oarray);
32 // void fast_cosfv(const uint32_t size, float const * __restrict__ iarray, float* __restrict__ oarray);
33 
34 } //vdt namespace
35 
36 #endif /* COS_H_ */
void fast_sincos(const double xx, double &s, double &c)
Double precision sincos.
Definition: sincos.h:132
return c
Double_t x[n]
Definition: legend1.C:17
double fast_cos(double x)
Double precision cosine: just call sincos.
Definition: cos.h:22
void fast_sincosf(const float xx, float &s, float &c)
Single precision sincos.
Definition: sincos.h:207
Definition: asin.h:32
float fast_cosf(float x)
Definition: cos.h:26