Qucs-core  0.0.18
 All Data Structures Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros Groups 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$
22  *
23  */
24 
32 #ifndef __CONSTS_H__
33 #define __CONSTS_H__
34 
35 #include <cmath>
36 
37 namespace qucs {
38 
45 #ifndef M_PI
46 
47 #define M_PI 3.1415926535897932384626433832795029
48 #endif
49 
50 #ifndef M_PI_2
51 #define M_PI_2 1.5707963267948966192313216916397514
52 #endif
53 
54 #ifndef M_PI_4
55 #define M_PI_4 0.7853981633974483096156608458198757
56 #endif
57 
58 #ifndef M_1_PI
59 #define M_1_PI 0.3183098861837906715377675267450287
60 #endif
61 /*\brief Twice the inverse of Archimedes' constant (\f$2/\pi\f$) */
62 #ifndef M_2_PI
63 #define M_2_PI 0.6366197723675813430755350534900574
64 #endif
65 
66 #ifndef M_SQRTPI
67 #define M_SQRTPI 1.77245385090551602729816748334
68 #endif
69 
70 #ifndef M_E
71 #define M_E 2.7182818284590452353602874713526625
72 #endif
73 
74 #ifndef M_LOG10E
75 #define M_LOG10E 0.4342944819032518276511289189166051
76 #endif
77 
78 #ifndef M_LOG2E
79 #define M_LOG2E 1.4426950408889634073599246810018922
80 #endif
81 
82 #ifndef M_LN2
83 #define M_LN2 0.6931471805599453094172321214581766
84 #endif
85 
86 #ifndef M_LN10
87 #define M_LN10 2.3025850929940456840179914546843642
88 #endif
89 
90 #ifndef M_SQRT2
91 #define M_SQRT2 1.4142135623730950488016887242096981
92 #endif
93 
94 #ifndef M_SQRT1_2
95 #define M_SQRT1_2 0.7071067811865475244008443621048490
96 #endif
97 
100 #ifndef M_LIMEXP
101 #define M_LIMEXP 80.0
102 #endif
103 
108 } // namespace qucs
109 
110 #endif /* __CONSTS_H__ */