source: src/libcfa/limits @ 7528ba1

ADTaaron-thesisarm-ehast-experimentalcleanup-dtorsctordeferred_resndemanglerenumforall-pointer-decaygc_noraiijacob/cs343-translationjenkins-sandboxmemorynew-astnew-ast-unique-exprnew-envno_listpersistent-indexerpthread-emulationqualifiedEnumresolv-newwith_gc
Last change on this file since 7528ba1 was d3b7937, checked in by Peter A. Buhr <pabuhr@…>, 9 years ago

building runtime library (first attempt)

  • Property mode set to 100644
File size: 4.8 KB
Line 
1// Integral Constants
2
3const short int MIN = -32768;
4const int MIN = -2147483648;
5const long int MIN = -9223372036854775807L - 1L;
6const long long int MIN = -9223372036854775807LL - 1LL;
7
8const short int MAX = 32767;
9const unsigned short int MAX = 65535;
10const int MAX = 2147483647;
11const unsigned int MAX = 4294967295_U;
12const long int MAX = 9223372036854775807_L;
13const unsigned long int MAX = 4294967295_U;
14const long long int MAX = 9223372036854775807_LL;
15const unsigned long long int MAX = 18446744073709551615_ULL;
16
17// Floating-Point Constants
18
19const float PI = 3.141592_F;                            // pi
20const float PI_2 = 1.570796_F;                          // pi / 2
21const float PI_4 = 0.7853981_F;                         // pi / 4
22const float _1_PI = 0.3183098_F;                        // 1 / pi
23const float _2_PI = 0.6366197_F;                        // 2 / pi
24const float _2_SQRT_PI = 1.128379_F;                    // 2 / sqrt(pi)
25
26const double PI = 3.14159265358979323846_D;             // pi
27const double PI_2 = 1.57079632679489661923_D;           // pi / 2
28const double PI_4 = 0.78539816339744830962_D;           // pi / 4
29const double _1_PI = 0.31830988618379067154_D;          // 1 / pi
30const double _2_PI = 0.63661977236758134308_D;          // 2 / pi
31const double _2_SQRT_PI = 1.12837916709551257390_D;     // 2 / sqrt(pi)
32
33const long double PI = 3.1415926535897932384626433832795029_DL; // pi
34const long double PI_2 = 1.5707963267948966192313216916397514_DL; // pi / 2
35const long double PI_4 = 0.7853981633974483096156608458198757_DL; // pi / 4
36const long double _1_PI = 0.3183098861837906715377675267450287_DL; // 1 / pi
37const long double _2_PI = 0.6366197723675813430755350534900574_DL; // 2 / pi
38const long double _2_SQRT_PI = 1.1283791670955125738961589031215452_DL; // 2 / sqrt(pi)
39
40const _Complex PI = 3.14159265358979323846_D+0.0_iD;    // pi
41const _Complex PI_2 = 1.57079632679489661923_D+0.0_iD;  // pi / 2
42const _Complex PI_4 = 0.78539816339744830962_D+0.0_iD;  // pi / 4
43const _Complex _1_PI = 0.31830988618379067154_D+0.0_iD; // 1 / pi
44const _Complex _2_PI = 0.63661977236758134308_D+0.0_iD; // 2 / pi
45const _Complex _2_SQRT_PI = 1.12837916709551257390_D+0.0_iD; // 2 / sqrt(pi)
46
47const long _Complex PI = 3.1415926535897932384626433832795029_L+0.0iL; // pi
48const long _Complex PI_2 = 1.5707963267948966192313216916397514_L+0.0iL; // pi / 2
49const long _Complex PI_4 = 0.7853981633974483096156608458198757_L+0.0iL; // pi / 4
50const long _Complex _1_PI = 0.3183098861837906715377675267450287_L+0.0iL; // 1 / pi
51const long _Complex _2_PI = 0.6366197723675813430755350534900574_L+0.0iL; // 2 / pi
52const long _Complex _2_SQRT_PI = 1.1283791670955125738961589031215452_L+0.0iL; // 2 / sqrt(pi)
53
54const float E = 2.718281;                               // e
55const float LOG2_E = 1.442695;                          // log_2(e)
56const float LOG10_E = 0.4342944;                        // log_10(e)
57const float LN_2 = 0.6931471;                           // log_e(2)
58const float LN_10 = 2.302585;                           // log_e(10)
59const float SQRT_2 = 1.414213;                          // sqrt(2)
60const float _1_SQRT_2 = 0.7071067;                      // 1 / sqrt(2)
61
62const double E = 2.7182818284590452354_D;               // e
63const double LOG2_E = 1.4426950408889634074_D;          // log_2(e)
64const double LOG10_E = 0.43429448190325182765_D;        // log_10(e)
65const double LN_2 = 0.69314718055994530942_D;           // log_e(2)
66const double LN_10 = 2.30258509299404568402_D;          // log_e(10)
67const double SQRT_2 = 1.41421356237309504880_D;         // sqrt(2)
68const double _1_SQRT_2 = 0.70710678118654752440_D;      // 1 / sqrt(2)
69
70const long double E = 2.7182818284590452353602874713526625_DL; // e
71const long double LOG2_E = 1.4426950408889634073599246810018921_DL; // log_2(e)
72const long double LOG10_E = 0.4342944819032518276511289189166051_DL; // log_10(e)
73const long double LN_2 = 0.6931471805599453094172321214581766_DL; // log_e(2)
74const long double LN_10 = 2.3025850929940456840179914546843642_DL; // log_e(10)
75const long double SQRT_2 = 1.4142135623730950488016887242096981_DL; // sqrt(2)
76const long double _1_SQRT_2 = 0.7071067811865475244008443621048490_DL; // 1/sqrt(2)
77
78const _Complex E = 2.7182818284590452354_D+0.0_iD;      // e
79const _Complex LOG2_E = 1.4426950408889634074_D+0.0_iD; // log_2(e)
80const _Complex LOG10_E = 0.43429448190325182765_D+0.0_iD; // log_10(e)
81const _Complex LN_2 = 0.69314718055994530942_D+0.0_iD;  // log_e(2)
82const _Complex LN_10 = 2.30258509299404568402_D+0.0_iD; // log_e(10)
83const _Complex SQRT_2 = 1.41421356237309504880_D+0.0_iD;        // sqrt(2)
84const _Complex _1_SQRT_2 = 0.70710678118654752440_D+0.0_iD; // 1 / sqrt(2)
85
86const long _Complex E = 2.7182818284590452353602874713526625_L+0.0_iL; // e
87const long _Complex LOG2_E = 1.4426950408889634073599246810018921_L+0.0_iL; // log_2(e)
88const long _Complex LOG10_E = 0.4342944819032518276511289189166051_L+0.0_iL; // log_10(e)
89const long _Complex LN_2 = 0.6931471805599453094172321214581766_L+0.0_iL; // log_e(2)
90const long _Complex LN_10 = 2.3025850929940456840179914546843642_L+0.0_iL; // log_e(10)
91const long _Complex SQRT_2 = 1.4142135623730950488016887242096981_L+0.0_iL; // sqrt(2)
92const long _Complex _1_SQRT_2 = 0.7071067811865475244008443621048490_L+0.0_iL; // 1 / sqrt(2)
Note: See TracBrowser for help on using the repository browser.