My Project  0.0.16
QUCS Mapping
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Pages
consts.h
Go to the documentation of this file.
1 /*
2  * consts.h - global math constant header file
3  *
4  * Copyright (C) 2004, 2005, 2007 Stefan Jahn <stefan@lkcc.org>
5  *
6  * This is free software; you can redistribute it and/or modify
7  * it under the terms of the GNU General Public License as published by
8  * the Free Software Foundation; either version 2, or (at your option)
9  * any later version.
10  *
11  * This software is distributed in the hope that it will be useful,
12  * but WITHOUT ANY WARRANTY; without even the implied warranty of
13  * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
14  * GNU General Public License for more details.
15  *
16  * You should have received a copy of the GNU General Public License
17  * along with this package; see the file COPYING. If not, write to
18  * the Free Software Foundation, Inc., 51 Franklin Street - Fifth Floor,
19  * Boston, MA 02110-1301, USA.
20  *
21  * $Id: consts.h 1825 2011-03-11 20:42:14Z ela $
22  *
23  */
24 
25 /*\file consts.h
26  Global math constant header file
27 */
28 
29 #ifndef __CONSTS_H__
30 #define __CONSTS_H__
31 
32 #include <math.h>
33 
34 #ifndef M_PI
35 
36 #define M_PI 3.1415926535897932384626433832795029
37 #endif
38 
39 #ifndef M_PI_2
40 #define M_PI_2 1.5707963267948966192313216916397514
41 #endif
42 
43 #ifndef M_PI_4
44 #define M_PI_4 0.7853981633974483096156608458198757
45 #endif
46 
47 #ifndef M_1_PI
48 #define M_1_PI 0.3183098861837906715377675267450287
49 #endif
50 /*\brief Twice the inverse of Archimedes' constant (\f$2/\pi\f$) */
51 #ifndef M_2_PI
52 #define M_2_PI 0.6366197723675813430755350534900574
53 #endif
54 
55 #ifndef M_SQRTPI
56 #define M_SQRTPI 1.77245385090551602729816748334
57 #endif
58 
59 #ifndef M_E
60 #define M_E 2.7182818284590452353602874713526625
61 #endif
62 
63 #ifndef M_LOG10E
64 #define M_LOG10E 0.4342944819032518276511289189166051
65 #endif
66 
67 #ifndef M_LOG2E
68 #define M_LOG2E 1.4426950408889634073599246810018922
69 #endif
70 
71 #ifndef M_LN2
72 #define M_LN2 0.6931471805599453094172321214581766
73 #endif
74 
75 #ifndef M_LN10
76 #define M_LN10 2.3025850929940456840179914546843642
77 #endif
78 
79 #ifndef M_SQRT2
80 #define M_SQRT2 1.4142135623730950488016887242096981
81 #endif
82 
83 #ifndef M_SQRT1_2
84 #define M_SQRT1_2 0.7071067811865475244008443621048490
85 #endif
86 
89 #ifndef M_LIMEXP
90 #define M_LIMEXP 80.0
91 #endif
92 
93 #endif /* __CONSTS_H__ */