Free cookie consent management tool by TermsFeed Policy Generator

source: trunk/HeuristicLab.ExtLibs/HeuristicLab.NativeInterpreter/0.1/NativeInterpreter-0.1/lib/vdt/cos.h @ 18191

Last change on this file since 18191 was 16269, checked in by bburlacu, 6 years ago

#2958: Add C++ source code

File size: 952 bytes
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
17namespace vdt{
18
19// Cos double precision --------------------------------------------------------
20
21/// Double precision cosine: just call sincos.
22inline double fast_cos(double x){double s,c;fast_sincos(x,s,c);return c;}
23
24//------------------------------------------------------------------------------
25
26inline 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.