Line | |
---|
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 |
|
---|
30 | } //vdt namespace
|
---|
31 |
|
---|
32 | #endif /* COS_H_ */
|
---|
Note: See
TracBrowser
for help on using the repository browser.