[3e8fb3b] | 1 | // |
---|
| 2 | // Cforall Version 1.0.0 Copyright (C) 2015 University of Waterloo |
---|
| 3 | // |
---|
| 4 | // The contents of this file are covered under the licence agreement in the |
---|
| 5 | // file "LICENCE" distributed with Cforall. |
---|
| 6 | // |
---|
[dc8511c] | 7 | // limits.cfa -- |
---|
[3e8fb3b] | 8 | // |
---|
| 9 | // Author : Peter A. Buhr |
---|
| 10 | // Created On : Tue May 10 20:44:20 2016 |
---|
| 11 | // Last Modified By : Peter A. Buhr |
---|
[53692b3] | 12 | // Last Modified On : Sat Jun 5 10:07:32 2021 |
---|
| 13 | // Update Count : 11 |
---|
[ebcd82b] | 14 | // |
---|
[3e8fb3b] | 15 | |
---|
[6fbe9a5] | 16 | // Note: For testing the ability to load the constants defined in libcfa/src/limits.cfa, |
---|
| 17 | // see discussion in test const-init. |
---|
| 18 | |
---|
[73abe95] | 19 | #include <limits.hfa> |
---|
[d3b7937] | 20 | |
---|
| 21 | // Integral Constants |
---|
| 22 | |
---|
[2701c91] | 23 | signed char m = MIN; |
---|
| 24 | unsigned char m = MIN; |
---|
[3e8fb3b] | 25 | short int m = MIN; |
---|
[2701c91] | 26 | unsigned short int m = MIN; |
---|
[3e8fb3b] | 27 | int m = MIN; |
---|
[2701c91] | 28 | unsigned int m = MIN; |
---|
[3e8fb3b] | 29 | long int m = MIN; |
---|
[2701c91] | 30 | unsigned long int m = MIN; |
---|
[3e8fb3b] | 31 | long long int m = MIN; |
---|
[2701c91] | 32 | unsigned long long int m = MIN; |
---|
[d3b7937] | 33 | |
---|
[2701c91] | 34 | signed char M = MAX; |
---|
| 35 | unsigned char M = MAX; |
---|
[3e8fb3b] | 36 | short int M = MAX; |
---|
| 37 | unsigned short int M = MAX; |
---|
| 38 | int M = MAX; |
---|
| 39 | unsigned int M = MAX; |
---|
| 40 | long int M = MAX; |
---|
| 41 | unsigned long int M = MAX; |
---|
| 42 | long long int M = MAX; |
---|
| 43 | unsigned long long int M = MAX; |
---|
[d3b7937] | 44 | |
---|
| 45 | // Floating-Point Constants |
---|
| 46 | |
---|
[2701c91] | 47 | float m = MIN; |
---|
| 48 | double m = MIN; |
---|
| 49 | long double m = MIN; |
---|
| 50 | float _Complex m = MIN; |
---|
| 51 | double _Complex m = MIN; |
---|
| 52 | long double _Complex m = MIN; |
---|
| 53 | |
---|
| 54 | float M = MAX; |
---|
| 55 | double M = MAX; |
---|
| 56 | long double M = MAX; |
---|
| 57 | float _Complex M = MAX; |
---|
| 58 | double _Complex M = MAX; |
---|
| 59 | long double _Complex M = MAX; |
---|
| 60 | |
---|
[3e8fb3b] | 61 | float pi = PI; |
---|
| 62 | float pi_2 = PI_2; |
---|
| 63 | float pi_4 = PI_4; |
---|
| 64 | float _1_pi = _1_PI; |
---|
| 65 | float _2_pi = _2_PI; |
---|
| 66 | float _2_sqrt_pi = _2_SQRT_PI; |
---|
| 67 | |
---|
| 68 | double pi = PI; |
---|
| 69 | double pi_2 = PI_2; |
---|
| 70 | double pi_4 = PI_4; |
---|
| 71 | double _1_pi = _1_PI; |
---|
| 72 | double _2_pi = _2_PI; |
---|
| 73 | double _2_SQRT_pi = _2_SQRT_PI; |
---|
| 74 | |
---|
| 75 | long double pi = PI; |
---|
| 76 | long double pi_2 = PI_2; |
---|
| 77 | long double pi_4 = PI_4; |
---|
| 78 | long double _1_pi = _1_PI; |
---|
| 79 | long double _2_pi = _2_PI; |
---|
| 80 | long double _2_sqrt_pi = _2_SQRT_PI; |
---|
| 81 | |
---|
[2701c91] | 82 | float _Complex pi = PI; |
---|
| 83 | float _Complex pi_2 = PI_2; |
---|
| 84 | float _Complex pi_4 = PI_4; |
---|
| 85 | float _Complex _1_pi = _1_PI; |
---|
| 86 | float _Complex _2_pi = _2_PI; |
---|
| 87 | float _Complex _2_sqrt_pi = _2_SQRT_PI; |
---|
| 88 | |
---|
| 89 | double _Complex pi = PI; |
---|
| 90 | double _Complex pi_2 = PI_2; |
---|
| 91 | double _Complex pi_4 = PI_4; |
---|
| 92 | double _Complex _1_pi = _1_PI; |
---|
| 93 | double _Complex _2_pi = _2_PI; |
---|
| 94 | double _Complex _2_sqrt_pi = _2_SQRT_PI; |
---|
| 95 | |
---|
| 96 | long double _Complex pi = PI; |
---|
| 97 | long double _Complex pi_2 = PI_2; |
---|
| 98 | long double _Complex pi_4 = PI_4; |
---|
| 99 | long double _Complex _1_pi = _1_PI; |
---|
| 100 | long double _Complex _2_pi = _2_PI; |
---|
| 101 | long double _Complex _2_sqrt_pi = _2_SQRT_PI; |
---|
[3e8fb3b] | 102 | |
---|
| 103 | float e = E; |
---|
| 104 | float log2_e = LOG2_E; |
---|
| 105 | float log10_e = LOG10_E; |
---|
| 106 | float ln_2 = LN_2; |
---|
| 107 | float ln_10 = LN_10; |
---|
| 108 | float sqrt_2 = SQRT_2; |
---|
| 109 | float _1_sqrt_2 = _1_SQRT_2; |
---|
| 110 | |
---|
| 111 | double e = E; |
---|
| 112 | double log2_e = LOG2_E; |
---|
| 113 | double log10_e = LOG10_E; |
---|
| 114 | double ln_2 = LN_2; |
---|
| 115 | double ln_10 = LN_10; |
---|
| 116 | double sqrt_2 = SQRT_2; |
---|
| 117 | double _1_sqrt_2 = _1_SQRT_2; |
---|
| 118 | |
---|
| 119 | long double e = E; |
---|
| 120 | long double log2_e = LOG2_E; |
---|
| 121 | long double log10_e = LOG10_E; |
---|
| 122 | long double ln_2 = LN_2; |
---|
| 123 | long double ln_10 = LN_10; |
---|
| 124 | long double sqrt_2 = SQRT_2; |
---|
| 125 | long double _1_sqrt_2 = _1_SQRT_2; |
---|
| 126 | |
---|
[2701c91] | 127 | float _Complex e = E; |
---|
| 128 | float _Complex log2_e = LOG2_E; |
---|
| 129 | float _Complex log10_e = LOG10_E; |
---|
| 130 | float _Complex ln_2 = LN_2; |
---|
| 131 | float _Complex ln_10 = LN_10; |
---|
| 132 | float _Complex sqrt_2 = SQRT_2; |
---|
| 133 | float _Complex _1_sqrt_2 = _1_SQRT_2; |
---|
| 134 | |
---|
| 135 | double _Complex e = E; |
---|
| 136 | double _Complex log2_e = LOG2_E; |
---|
| 137 | double _Complex log10_e = LOG10_E; |
---|
| 138 | double _Complex ln_2 = LN_2; |
---|
| 139 | double _Complex ln_10 = LN_10; |
---|
| 140 | double _Complex sqrt_2 = SQRT_2; |
---|
| 141 | double _Complex _1_sqrt_2 = _1_SQRT_2; |
---|
| 142 | |
---|
| 143 | long double _Complex e = E; |
---|
| 144 | long double _Complex log2_e = LOG2_E; |
---|
| 145 | long double _Complex log10_e = LOG10_E; |
---|
| 146 | long double _Complex ln_2 = LN_2; |
---|
| 147 | long double _Complex ln_10 = LN_10; |
---|
| 148 | long double _Complex sqrt_2 = SQRT_2; |
---|
| 149 | long double _Complex _1_sqrt_2 = _1_SQRT_2; |
---|
[d3b7937] | 150 | |
---|
[ebcd82b] | 151 | int main(int argc, char const *argv[]) { |
---|
[53692b3] | 152 | #pragma GCC warning "Compiled" // force non-empty .expect file, NO TABS!!! |
---|
[ebcd82b] | 153 | } |
---|
| 154 | |
---|
[d3b7937] | 155 | // Local Variables: // |
---|
| 156 | // tab-width: 4 // |
---|
[dc8511c] | 157 | // compile-command: "cfa limits.cfa" // |
---|
[d3b7937] | 158 | // End: // |
---|