]>
Commit | Line | Data |
---|---|---|
54c1bf78 | 1 | // The template and inlines for the -*- C++ -*- numeric_limits classes. |
de96ac46 | 2 | |
54c1bf78 | 3 | // Copyright (C) 1999-2001 Free Software Foundation, Inc. |
de96ac46 BK |
4 | // |
5 | // This file is part of the GNU ISO C++ Library. This library is free | |
6 | // software; you can redistribute it and/or modify it under the | |
7 | // terms of the GNU General Public License as published by the | |
8 | // Free Software Foundation; either version 2, or (at your option) | |
9 | // any later version. | |
10 | ||
11 | // This library 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 along | |
17 | // with this library; see the file COPYING. If not, write to the Free | |
18 | // Software Foundation, 59 Temple Place - Suite 330, Boston, MA 02111-1307, | |
19 | // USA. | |
20 | ||
21 | // As a special exception, you may use this file as part of a free software | |
22 | // library without restriction. Specifically, if other files instantiate | |
23 | // templates or use macros or inline functions from this file, or you compile | |
24 | // this file and link it with other files to produce an executable, this | |
25 | // file does not by itself cause the resulting executable to be covered by | |
26 | // the GNU General Public License. This exception does not however | |
27 | // invalidate any other reasons why the executable file might be covered by | |
28 | // the GNU General Public License. | |
29 | ||
54c1bf78 BK |
30 | // Note: this is not a conforming implementation. |
31 | // Written by Gabriel Dos Reis <gdr@codesourcery.com> | |
32 | ||
33 | // | |
34 | // ISO 14882:1998 | |
35 | // 18.2.1 | |
36 | // | |
37 | ||
38 | /** @file std_limits.h | |
39 | * This is an internal header file, included by other library headers. | |
40 | * You should not attempt to use it directly. | |
2f9d51b8 PE |
41 | */ |
42 | ||
54c1bf78 BK |
43 | #ifndef _CPP_NUMERIC_LIMITS |
44 | #define _CPP_NUMERIC_LIMITS 1 | |
45 | ||
46 | #pragma GCC system_header | |
47 | ||
48 | #include <bits/cpu_limits.h> | |
49 | #include <bits/c++config.h> | |
50 | ||
51 | // | |
52 | // The numeric_limits<> traits document implementation-defined aspects | |
53 | // of fundamental arithmetic data types (integers and floating points). | |
54 | // From Standard C++ point of view, there are 13 such types: | |
55 | // * integers | |
56 | // bool (1) | |
57 | // char, signed char, unsigned char (3) | |
58 | // short, unsigned short (2) | |
59 | // int, unsigned (2) | |
60 | // long, unsigned long (2) | |
61 | // | |
62 | // * floating points | |
63 | // float (1) | |
64 | // double (1) | |
65 | // long double (1) | |
66 | // | |
67 | // GNU C++ undertstands (where supported by the host C-library) | |
68 | // * integer | |
69 | // long long, unsigned long long (2) | |
70 | // | |
71 | // which brings us to 15 fundamental arithmetic data types in GNU C++. | |
72 | // | |
73 | // | |
74 | // Since a numeric_limits<> is a bit tricky to get right, we rely on | |
75 | // an interface composed of macros which should be defined in config/os | |
76 | // or config/cpu when they differ from the generic (read arbitrary) | |
77 | // definitions given here. | |
78 | // | |
79 | ||
80 | // These values can be overridden in the target configuration file. | |
81 | // The default values are appropriate for many 32-bit targets. | |
82 | ||
83 | #ifndef __glibcpp_char_bits | |
84 | #define __glibcpp_char_bits 8 | |
85 | #endif | |
86 | #ifdef __CHAR_UNSIGNED__ | |
87 | #define __glibcpp_plain_char_is_signed false | |
88 | #else | |
89 | #define __glibcpp_plain_char_is_signed true | |
90 | #endif | |
91 | #ifndef __glibcpp_short_bits | |
92 | #define __glibcpp_short_bits 16 | |
93 | #endif | |
94 | #ifndef __glibcpp_int_bits | |
95 | #define __glibcpp_int_bits 32 | |
96 | #endif | |
97 | #ifndef __glibcpp_long_bits | |
98 | #define __glibcpp_long_bits 32 | |
99 | #endif | |
100 | #ifndef __glibcpp_wchar_t_bits | |
101 | #define __glibcpp_wchar_t_bits 32 | |
102 | #endif | |
103 | #ifndef __glibcpp_wchar_t_is_signed | |
104 | #define __glibcpp_wchar_t_is_signed true | |
105 | #endif | |
106 | #ifndef __glibcpp_long_long_bits | |
107 | #define __glibcpp_long_long_bits 64 | |
108 | #endif | |
109 | #ifndef __glibcpp_float_bits | |
110 | #define __glibcpp_float_bits 32 | |
111 | #endif | |
112 | #ifndef __glibcpp_double_bits | |
113 | #define __glibcpp_double_bits 64 | |
114 | #endif | |
115 | #ifndef __glibcpp_long_double_bits | |
116 | #define __glibcpp_long_double_bits 128 | |
117 | #endif | |
118 | ||
119 | #ifndef __glibcpp_char_traps | |
120 | #define __glibcpp_char_traps true | |
121 | #endif | |
122 | #ifndef __glibcpp_short_traps | |
123 | #define __glibcpp_short_traps true | |
124 | #endif | |
125 | #ifndef __glibcpp_int_traps | |
126 | #define __glibcpp_int_traps true | |
127 | #endif | |
128 | #ifndef __glibcpp_long_traps | |
129 | #define __glibcpp_long_traps true | |
130 | #endif | |
131 | #ifndef __glibcpp_wchar_t_traps | |
132 | #define __glibcpp_wchar_t_traps true | |
133 | #endif | |
134 | #ifndef __glibcpp_long_long_traps | |
135 | #define __glibcpp_long_long_traps true | |
136 | #endif | |
137 | ||
138 | // You should not need to define any macros below this point, unless | |
139 | // you have a machine with non-standard bit-widths. | |
140 | ||
141 | // These values are the minimums and maximums for standard data types | |
142 | // of common widths. | |
143 | ||
144 | #define __glibcpp_s8_max 127 | |
145 | #define __glibcpp_s8_min (-__glibcpp_s8_max - 1) | |
146 | #define __glibcpp_s8_digits 7 | |
147 | #define __glibcpp_s8_digits10 2 | |
148 | #define __glibcpp_u8_min 0U | |
149 | #define __glibcpp_u8_max (__glibcpp_s8_max * 2 + 1) | |
150 | #define __glibcpp_u8_digits 8 | |
151 | #define __glibcpp_u8_digits10 2 | |
152 | #define __glibcpp_s16_max 32767 | |
153 | #define __glibcpp_s16_min (-__glibcpp_s16_max - 1) | |
154 | #define __glibcpp_s16_digits 15 | |
155 | #define __glibcpp_s16_digits10 4 | |
156 | #define __glibcpp_u16_min 0U | |
157 | #define __glibcpp_u16_max (__glibcpp_s16_max * 2 + 1) | |
158 | #define __glibcpp_u16_digits 16 | |
159 | #define __glibcpp_u16_digits10 4 | |
160 | #define __glibcpp_s32_max 2147483647L | |
161 | #define __glibcpp_s32_min (-__glibcpp_s32_max - 1) | |
162 | #define __glibcpp_s32_digits 31 | |
163 | #define __glibcpp_s32_digits10 9 | |
164 | #define __glibcpp_u32_min 0UL | |
165 | #define __glibcpp_u32_max (__glibcpp_s32_max * 2U + 1) | |
166 | #define __glibcpp_u32_digits 32 | |
167 | #define __glibcpp_u32_digits10 9 | |
168 | #define __glibcpp_s64_max 9223372036854775807LL | |
169 | #define __glibcpp_s64_min (-__glibcpp_s64_max - 1) | |
170 | #define __glibcpp_s64_digits 63 | |
171 | #define __glibcpp_s64_digits10 18 | |
172 | #define __glibcpp_u64_min 0ULL | |
173 | #define __glibcpp_u64_max (__glibcpp_s64_max * 2ULL + 1) | |
174 | #define __glibcpp_u64_digits 64 | |
175 | #define __glibcpp_u64_digits10 19 | |
176 | ||
177 | #define __glibcpp_f32_min 1.17549435e-38F | |
178 | #define __glibcpp_f32_max 3.40282347e+38F | |
179 | #define __glibcpp_f32_digits 24 | |
180 | #define __glibcpp_f32_digits10 6 | |
181 | #define __glibcpp_f32_radix 2 | |
182 | #define __glibcpp_f32_epsilon 1.19209290e-07F | |
183 | #define __glibcpp_f32_round_error 1.0F | |
184 | #define __glibcpp_f32_min_exponent -125 | |
185 | #define __glibcpp_f32_min_exponent10 -37 | |
186 | #define __glibcpp_f32_max_exponent 128 | |
187 | #define __glibcpp_f32_max_exponent10 38 | |
188 | #define __glibcpp_f64_min 2.2250738585072014e-308 | |
189 | #define __glibcpp_f64_max 1.7976931348623157e+308 | |
190 | #define __glibcpp_f64_digits 53 | |
191 | #define __glibcpp_f64_digits10 15 | |
192 | #define __glibcpp_f64_radix 2 | |
193 | #define __glibcpp_f64_epsilon 2.2204460492503131e-16 | |
194 | #define __glibcpp_f64_round_error 1.0 | |
195 | #define __glibcpp_f64_min_exponent -1021 | |
196 | #define __glibcpp_f64_min_exponent10 -307 | |
197 | #define __glibcpp_f64_max_exponent 1024 | |
198 | #define __glibcpp_f64_max_exponent10 308 | |
199 | #define __glibcpp_f80_min 3.36210314311209350626e-4932L | |
200 | #define __glibcpp_f80_max 1.18973149535723176502e+4932L | |
201 | #define __glibcpp_f80_digits 64 | |
202 | #define __glibcpp_f80_digits10 18 | |
203 | #define __glibcpp_f80_radix 2 | |
204 | #define __glibcpp_f80_epsilon 1.08420217248550443401e-19L | |
205 | #define __glibcpp_f80_round_error 1.0L | |
206 | #define __glibcpp_f80_min_exponent -16381 | |
207 | #define __glibcpp_f80_min_exponent10 -4931 | |
208 | #define __glibcpp_f80_max_exponent 16384 | |
209 | #define __glibcpp_f80_max_exponent10 4932 | |
210 | #define __glibcpp_f96_min 1.68105157155604675313e-4932L | |
211 | #define __glibcpp_f96_max 1.18973149535723176502e+4932L | |
212 | #define __glibcpp_f96_digits 64 | |
213 | #define __glibcpp_f96_digits10 18 | |
214 | #define __glibcpp_f96_radix 2 | |
215 | #define __glibcpp_f96_epsilon 1.08420217248550443401e-19L | |
216 | #define __glibcpp_f96_round_error 1.0L | |
217 | #define __glibcpp_f96_min_exponent -16382 | |
218 | #define __glibcpp_f96_min_exponent10 -4931 | |
219 | #define __glibcpp_f96_max_exponent 16384 | |
220 | #define __glibcpp_f96_max_exponent10 4932 | |
221 | #define __glibcpp_f128_min 3.362103143112093506262677817321752603E-4932L | |
222 | #define __glibcpp_f128_max 1.189731495357231765085759326628007016E+4932L | |
223 | #define __glibcpp_f128_digits 113 | |
224 | #define __glibcpp_f128_digits10 33 | |
225 | #define __glibcpp_f128_radix 2 | |
226 | #define __glibcpp_f128_epsilon 1.925929944387235853055977942584927319E-34L | |
227 | #define __glibcpp_f128_round_error 1.0L | |
228 | #define __glibcpp_f128_min_exponent -16381 | |
229 | #define __glibcpp_f128_min_exponent10 -4931 | |
230 | #define __glibcpp_f128_max_exponent 16384 | |
231 | #define __glibcpp_f128_max_exponent10 4932 | |
232 | ||
233 | // bool-specific hooks: | |
234 | // __glibcpp_bool_digits __glibcpp_int_traps __glibcpp_long_traps | |
235 | ||
236 | // This is actually CHAR_BITS because the new ABI says a bool | |
237 | // is one (1) byte wide. | |
238 | ||
239 | #ifndef __glibcpp_bool_digits | |
240 | #define __glibcpp_bool_digits __glibcpp_char_bits | |
241 | #endif | |
242 | ||
243 | // char. | |
244 | ||
245 | #define __glibcpp_plain_char_traps true | |
246 | #define __glibcpp_signed_char_traps true | |
247 | #define __glibcpp_unsigned_char_traps true | |
248 | #ifndef __glibcpp_char_is_modulo | |
249 | #define __glibcpp_char_is_modulo true | |
250 | #endif | |
251 | #ifndef __glibcpp_signed_char_is_modulo | |
252 | #define __glibcpp_signed_char_is_modulo true | |
253 | #endif | |
254 | #if __glibcpp_char_bits == 8 | |
255 | #define __glibcpp_signed_char_min __glibcpp_s8_min | |
256 | #define __glibcpp_signed_char_max __glibcpp_s8_max | |
257 | #define __glibcpp_signed_char_digits __glibcpp_s8_digits | |
258 | #define __glibcpp_signed_char_digits10 __glibcpp_s8_digits10 | |
259 | #define __glibcpp_unsigned_char_min __glibcpp_u8_min | |
260 | #define __glibcpp_unsigned_char_max __glibcpp_u8_max | |
261 | #define __glibcpp_unsigned_char_digits __glibcpp_u8_digits | |
262 | #define __glibcpp_unsigned_char_digits10 __glibcpp_u8_digits10 | |
263 | #elif __glibcpp_char_bits == 16 | |
264 | #define __glibcpp_signed_char_min __glibcpp_s16_min | |
265 | #define __glibcpp_signed_char_max __glibcpp_s16_max | |
266 | #define __glibcpp_signed_char_digits __glibcpp_s16_digits | |
267 | #define __glibcpp_signed_char_digits10 __glibcpp_s16_digits10 | |
268 | #define __glibcpp_unsigned_char_min __glibcpp_u16_min | |
269 | #define __glibcpp_unsigned_char_max __glibcpp_u16_max | |
270 | #define __glibcpp_unsigned_char_digits __glibcpp_u16_digits | |
271 | #define __glibcpp_unsigned_char_digits10 __glibcpp_u16_digits10 | |
272 | #elif __glibcpp_char_bits == 32 | |
273 | #define __glibcpp_signed_char_min (signed char)__glibcpp_s32_min | |
274 | #define __glibcpp_signed_char_max (signed char)__glibcpp_s32_max | |
275 | #define __glibcpp_signed_char_digits __glibcpp_s32_digits | |
276 | #define __glibcpp_signed_char_digits10 __glibcpp_s32_digits10 | |
277 | #define __glibcpp_unsigned_char_min (unsigned char)__glibcpp_u32_min | |
278 | #define __glibcpp_unsigned_char_max (unsigned char)__glibcpp_u32_max | |
279 | #define __glibcpp_unsigned_char_digits __glibcpp_u32_digits | |
280 | #define __glibcpp_unsigned_char_digits10 __glibcpp_u32_digits10 | |
281 | #elif __glibcpp_char_bits == 64 | |
282 | #define __glibcpp_signed_char_min (signed char)__glibcpp_s64_min | |
283 | #define __glibcpp_signed_char_max (signed char)__glibcpp_s64_max | |
284 | #define __glibcpp_signed_char_digits __glibcpp_s64_digits | |
285 | #define __glibcpp_signed_char_digits10 __glibcpp_s64_digits10 | |
286 | #define __glibcpp_unsigned_char_min (unsigned char)__glibcpp_u64_min | |
287 | #define __glibcpp_unsigned_char_max (unsigned char)__glibcpp_u64_max | |
288 | #define __glibcpp_unsigned_char_digits __glibcpp_u64_digits | |
289 | #define __glibcpp_unsigned_char_digits10 __glibcpp_u64_digits10 | |
290 | #else | |
291 | // You must define these macros in the configuration file. | |
292 | #endif | |
293 | ||
294 | #if __glibcpp_plain_char_is_signed | |
295 | #define __glibcpp_char_min (char)__glibcpp_signed_char_min | |
296 | #define __glibcpp_char_max (char)__glibcpp_signed_char_max | |
297 | #define __glibcpp_char_digits __glibcpp_signed_char_digits | |
298 | #define __glibcpp_char_digits10 __glibcpp_signed_char_digits | |
299 | #else | |
300 | #define __glibcpp_char_min (char)__glibcpp_unsigned_char_min | |
301 | #define __glibcpp_char_max (char)__glibcpp_unsigned_char_max | |
302 | #define __glibcpp_char_digits __glibcpp_unsigned_char_digits | |
303 | #define __glibcpp_char_digits10 __glibcpp_unsigned_char_digits | |
304 | #endif | |
305 | ||
306 | // short | |
307 | ||
308 | #define __glibcpp_signed_short_traps true | |
309 | #define __glibcpp_unsigned_short_traps true | |
310 | #ifndef __glibcpp_signed_short_is_modulo | |
311 | #define __glibcpp_signed_short_is_modulo true | |
312 | #endif | |
313 | #if __glibcpp_short_bits == 8 | |
314 | #define __glibcpp_signed_short_min __glibcpp_s8_min | |
315 | #define __glibcpp_signed_short_max __glibcpp_s8_max | |
316 | #define __glibcpp_signed_short_digits __glibcpp_s8_digits | |
317 | #define __glibcpp_signed_short_digits10 __glibcpp_s8_digits10 | |
318 | #define __glibcpp_unsigned_short_min __glibcpp_u8_min | |
319 | #define __glibcpp_unsigned_short_max __glibcpp_u8_max | |
320 | #define __glibcpp_unsigned_short_digits __glibcpp_u8_digits | |
321 | #define __glibcpp_unsigned_short_digits10 __glibcpp_u8_digits10 | |
322 | #elif __glibcpp_short_bits == 16 | |
323 | #define __glibcpp_signed_short_min __glibcpp_s16_min | |
324 | #define __glibcpp_signed_short_max __glibcpp_s16_max | |
325 | #define __glibcpp_signed_short_digits __glibcpp_s16_digits | |
326 | #define __glibcpp_signed_short_digits10 __glibcpp_s16_digits10 | |
327 | #define __glibcpp_unsigned_short_min __glibcpp_u16_min | |
328 | #define __glibcpp_unsigned_short_max __glibcpp_u16_max | |
329 | #define __glibcpp_unsigned_short_digits __glibcpp_u16_digits | |
330 | #define __glibcpp_unsigned_short_digits10 __glibcpp_u16_digits10 | |
331 | #elif __glibcpp_short_bits == 32 | |
332 | #define __glibcpp_signed_short_min (short)__glibcpp_s32_min | |
333 | #define __glibcpp_signed_short_max (short)__glibcpp_s32_max | |
334 | #define __glibcpp_signed_short_digits __glibcpp_s32_digits | |
335 | #define __glibcpp_signed_short_digits10 __glibcpp_s32_digits10 | |
336 | #define __glibcpp_unsigned_short_min (unsigned short)__glibcpp_u32_min | |
337 | #define __glibcpp_unsigned_short_max (unsigned short)__glibcpp_u32_max | |
338 | #define __glibcpp_unsigned_short_digits __glibcpp_u32_digits | |
339 | #define __glibcpp_unsigned_short_digits10 __glibcpp_u32_digits10 | |
340 | #elif __glibcpp_short_bits == 64 | |
341 | #define __glibcpp_signed_short_min (short)__glibcpp_s64_min | |
342 | #define __glibcpp_signed_short_max (short)__glibcpp_s64_max | |
343 | #define __glibcpp_signed_short_digits __glibcpp_s64_digits | |
344 | #define __glibcpp_signed_short_digits10 __glibcpp_s64_digits10 | |
345 | #define __glibcpp_unsigned_short_min (unsigned short)__glibcpp_u64_min | |
346 | #define __glibcpp_unsigned_short_max (unsigned short)__glibcpp_u64_max | |
347 | #define __glibcpp_unsigned_short_digits __glibcpp_u64_digits | |
348 | #define __glibcpp_unsigned_short_digits10 __glibcpp_u64_digits10 | |
349 | #else | |
350 | // You must define these macros in the configuration file. | |
351 | #endif | |
352 | ||
353 | // int | |
354 | ||
355 | #define __glibcpp_signed_int_traps true | |
356 | #define __glibcpp_unsigned_int_traps true | |
357 | #ifndef __glibcpp_signed_int_is_modulo | |
358 | #define __glibcpp_signed_int_is_modulo true | |
359 | #endif | |
360 | #if __glibcpp_int_bits == 8 | |
361 | #define __glibcpp_signed_int_min __glibcpp_s8_min | |
362 | #define __glibcpp_signed_int_max __glibcpp_s8_max | |
363 | #define __glibcpp_signed_int_digits __glibcpp_s8_digits | |
364 | #define __glibcpp_signed_int_digits10 __glibcpp_s8_digits10 | |
365 | #define __glibcpp_unsigned_int_min __glibcpp_u8_min | |
366 | #define __glibcpp_unsigned_int_max __glibcpp_u8_max | |
367 | #define __glibcpp_unsigned_int_digits __glibcpp_u8_digits | |
368 | #define __glibcpp_unsigned_int_digits10 __glibcpp_u8_digits10 | |
369 | #elif __glibcpp_int_bits == 16 | |
370 | #define __glibcpp_signed_int_min __glibcpp_s16_min | |
371 | #define __glibcpp_signed_int_max __glibcpp_s16_max | |
372 | #define __glibcpp_signed_int_digits __glibcpp_s16_digits | |
373 | #define __glibcpp_signed_int_digits10 __glibcpp_s16_digits10 | |
374 | #define __glibcpp_unsigned_int_min __glibcpp_u16_min | |
375 | #define __glibcpp_unsigned_int_max __glibcpp_u16_max | |
376 | #define __glibcpp_unsigned_int_digits __glibcpp_u16_digits | |
377 | #define __glibcpp_unsigned_int_digits10 __glibcpp_u16_digits10 | |
378 | #elif __glibcpp_int_bits == 32 | |
379 | #define __glibcpp_signed_int_min (int)__glibcpp_s32_min | |
380 | #define __glibcpp_signed_int_max (int)__glibcpp_s32_max | |
381 | #define __glibcpp_signed_int_digits __glibcpp_s32_digits | |
382 | #define __glibcpp_signed_int_digits10 __glibcpp_s32_digits10 | |
383 | #define __glibcpp_unsigned_int_min (unsigned)__glibcpp_u32_min | |
384 | #define __glibcpp_unsigned_int_max (unsigned)__glibcpp_u32_max | |
385 | #define __glibcpp_unsigned_int_digits __glibcpp_u32_digits | |
386 | #define __glibcpp_unsigned_int_digits10 __glibcpp_u32_digits10 | |
387 | #elif __glibcpp_int_bits == 64 | |
388 | #define __glibcpp_signed_int_min (int)__glibcpp_s64_min | |
389 | #define __glibcpp_signed_int_max (int)__glibcpp_s64_max | |
390 | #define __glibcpp_signed_int_digits __glibcpp_s64_digits | |
391 | #define __glibcpp_signed_int_digits10 __glibcpp_s64_digits10 | |
392 | #define __glibcpp_unsigned_int_min (unsigned)__glibcpp_u64_min | |
393 | #define __glibcpp_unsigned_int_max (unsigned)__glibcpp_u64_max | |
394 | #define __glibcpp_unsigned_int_digits __glibcpp_u64_digits | |
395 | #define __glibcpp_unsigned_int_digits10 __glibcpp_u64_digits10 | |
396 | #else | |
397 | // You must define these macros in the configuration file. | |
398 | #endif | |
399 | ||
400 | // long | |
401 | ||
402 | #define __glibcpp_signed_long_traps true | |
403 | #define __glibcpp_unsigned_long_traps true | |
404 | #ifndef __glibcpp_signed_long_is_modulo | |
405 | #define __glibcpp_signed_long_is_modulo true | |
406 | #endif | |
407 | #if __glibcpp_long_bits == 8 | |
408 | #define __glibcpp_signed_long_min __glibcpp_s8_min | |
409 | #define __glibcpp_signed_long_max __glibcpp_s8_max | |
410 | #define __glibcpp_signed_long_digits __glibcpp_s8_digits | |
411 | #define __glibcpp_signed_long_digits10 __glibcpp_s8_digits10 | |
412 | #define __glibcpp_unsigned_long_min __glibcpp_u8_min | |
413 | #define __glibcpp_unsigned_long_max __glibcpp_u8_max | |
414 | #define __glibcpp_unsigned_long_digits __glibcpp_u8_digits | |
415 | #define __glibcpp_unsigned_long_digits10 __glibcpp_u8_digits10 | |
416 | #elif __glibcpp_long_bits == 16 | |
417 | #define __glibcpp_signed_long_min __glibcpp_s16_min | |
418 | #define __glibcpp_signed_long_max __glibcpp_s16_max | |
419 | #define __glibcpp_signed_long_digits __glibcpp_s16_digits | |
420 | #define __glibcpp_signed_long_digits10 __glibcpp_s16_digits10 | |
421 | #define __glibcpp_unsigned_long_min __glibcpp_u16_min | |
422 | #define __glibcpp_unsigned_long_max __glibcpp_u16_max | |
423 | #define __glibcpp_unsigned_long_digits __glibcpp_u16_digits | |
424 | #define __glibcpp_unsigned_long_digits10 __glibcpp_u16_digits10 | |
425 | #elif __glibcpp_long_bits == 32 | |
426 | #define __glibcpp_signed_long_min __glibcpp_s32_min | |
427 | #define __glibcpp_signed_long_max __glibcpp_s32_max | |
428 | #define __glibcpp_signed_long_digits __glibcpp_s32_digits | |
429 | #define __glibcpp_signed_long_digits10 __glibcpp_s32_digits10 | |
430 | #define __glibcpp_unsigned_long_min __glibcpp_u32_min | |
431 | #define __glibcpp_unsigned_long_max __glibcpp_u32_max | |
432 | #define __glibcpp_unsigned_long_digits __glibcpp_u32_digits | |
433 | #define __glibcpp_unsigned_long_digits10 __glibcpp_u32_digits10 | |
434 | #elif __glibcpp_long_bits == 64 | |
435 | #define __glibcpp_signed_long_min (long)__glibcpp_s64_min | |
436 | #define __glibcpp_signed_long_max (long)__glibcpp_s64_max | |
437 | #define __glibcpp_signed_long_digits __glibcpp_s64_digits | |
438 | #define __glibcpp_signed_long_digits10 __glibcpp_s64_digits10 | |
439 | #define __glibcpp_unsigned_long_min (unsigned long)__glibcpp_u64_min | |
440 | #define __glibcpp_unsigned_long_max (unsigned long)__glibcpp_u64_max | |
441 | #define __glibcpp_unsigned_long_digits __glibcpp_u64_digits | |
442 | #define __glibcpp_unsigned_long_digits10 __glibcpp_u64_digits10 | |
443 | #else | |
444 | // You must define these macros in the configuration file. | |
445 | #endif | |
446 | ||
447 | // long long | |
448 | ||
449 | #define __glibcpp_signed_long_long_traps true | |
450 | #define __glibcpp_signed_long_long_traps true | |
451 | #ifndef __glibcpp_signed_long_long_is_modulo | |
452 | #define __glibcpp_signed_long_long_is_modulo true | |
453 | #endif | |
454 | #if __glibcpp_long_long_bits == 8 | |
455 | #define __glibcpp_signed_long_long_min __glibcpp_s8_min | |
456 | #define __glibcpp_signed_long_long_max __glibcpp_s8_max | |
457 | #define __glibcpp_signed_long_long_digits __glibcpp_s8_digits | |
458 | #define __glibcpp_signed_long_long_digits10 __glibcpp_s8_digits10 | |
459 | #define __glibcpp_unsigned_long_long_min __glibcpp_u8_min | |
460 | #define __glibcpp_unsigned_long_long_max __glibcpp_u8_max | |
461 | #define __glibcpp_unsigned_long_long_digits __glibcpp_u8_digits | |
462 | #define __glibcpp_unsigned_long_long_digits10 __glibcpp_u8_digits10 | |
463 | #elif __glibcpp_long_long_bits == 16 | |
464 | #define __glibcpp_signed_long_long_min __glibcpp_s16_min | |
465 | #define __glibcpp_signed_long_long_max __glibcpp_s16_max | |
466 | #define __glibcpp_signed_long_long_digits __glibcpp_s16_digits | |
467 | #define __glibcpp_signed_long_long_digits10 __glibcpp_s16_digits10 | |
468 | #define __glibcpp_unsigned_long_long_min __glibcpp_u16_min | |
469 | #define __glibcpp_unsigned_long_long_max __glibcpp_u16_max | |
470 | #define __glibcpp_unsigned_long_long_digits __glibcpp_u16_digits | |
471 | #define __glibcpp_unsigned_long_long_digits10 __glibcpp_u16_digits10 | |
472 | #elif __glibcpp_long_long_bits == 32 | |
473 | #define __glibcpp_signed_long_long_min __glibcpp_s32_min | |
474 | #define __glibcpp_signed_long_long_max __glibcpp_s32_max | |
475 | #define __glibcpp_signed_long_long_digits __glibcpp_s32_digits | |
476 | #define __glibcpp_signed_long_long_digits10 __glibcpp_s32_digits10 | |
477 | #define __glibcpp_unsigned_long_long_min __glibcpp_u32_min | |
478 | #define __glibcpp_unsigned_long_long_max __glibcpp_u32_max | |
479 | #define __glibcpp_unsigned_long_long_digits __glibcpp_u32_digits | |
480 | #define __glibcpp_unsigned_long_long_digits10 __glibcpp_u32_digits10 | |
481 | #elif __glibcpp_long_long_bits == 64 | |
482 | #define __glibcpp_signed_long_long_min __glibcpp_s64_min | |
483 | #define __glibcpp_signed_long_long_max __glibcpp_s64_max | |
484 | #define __glibcpp_signed_long_long_digits __glibcpp_s64_digits | |
485 | #define __glibcpp_signed_long_long_digits10 __glibcpp_s64_digits10 | |
486 | #define __glibcpp_signed_long_long_traps true | |
487 | #define __glibcpp_unsigned_long_long_min __glibcpp_u64_min | |
488 | #define __glibcpp_unsigned_long_long_max __glibcpp_u64_max | |
489 | #define __glibcpp_unsigned_long_long_digits __glibcpp_u64_digits | |
490 | #define __glibcpp_unsigned_long_long_digits10 __glibcpp_u64_digits10 | |
491 | #define __glibcpp_unsigned_long_long_traps true | |
492 | #else | |
493 | // You must define these macros in the configuration file. | |
494 | #endif | |
495 | ||
496 | // wchar_t | |
497 | ||
498 | #define __glibcpp_wchar_t_traps true | |
499 | #ifndef __glibcpp_wchar_t_is_modulo | |
500 | #define __glibcpp_wchar_t_is_modulo true | |
501 | #endif | |
502 | #if __glibcpp_wchar_t_is_signed | |
503 | #if __glibcpp_wchar_t_bits == 8 | |
504 | #define __glibcpp_wchar_t_min __glibcpp_s8_min | |
505 | #define __glibcpp_wchar_t_max __glibcpp_s8_max | |
506 | #define __glibcpp_wchar_t_digits __glibcpp_s8_digits | |
507 | #define __glibcpp_wchar_t_digits10 __glibcpp_s8_digits10 | |
508 | #elif __glibcpp_wchar_t_bits == 16 | |
509 | #define __glibcpp_wchar_t_min __glibcpp_s16_min | |
510 | #define __glibcpp_wchar_t_max __glibcpp_s16_max | |
511 | #define __glibcpp_wchar_t_digits __glibcpp_s16_digits | |
512 | #define __glibcpp_wchar_t_digits10 __glibcpp_s16_digits10 | |
513 | #elif __glibcpp_wchar_t_bits == 32 | |
514 | #define __glibcpp_wchar_t_min (wchar_t)__glibcpp_s32_min | |
515 | #define __glibcpp_wchar_t_max (wchar_t)__glibcpp_s32_max | |
516 | #define __glibcpp_wchar_t_digits __glibcpp_s32_digits | |
517 | #define __glibcpp_wchar_t_digits10 __glibcpp_s32_digits10 | |
518 | #elif __glibcpp_wchar_t_bits == 64 | |
519 | #define __glibcpp_wchar_t_min (wchar_t)__glibcpp_s64_min | |
520 | #define __glibcpp_wchar_t_max (wchar_t)__glibcpp_s64_max | |
521 | #define __glibcpp_wchar_t_digits __glibcpp_s64_digits | |
522 | #define __glibcpp_wchar_t_digits10 __glibcpp_s64_digits10 | |
523 | #else | |
524 | // You must define these macros in the configuration file. | |
525 | #endif | |
526 | #else | |
527 | #if __glibcpp_wchar_t_bits == 8 | |
528 | #define __glibcpp_wchar_t_min __glibcpp_u8_min | |
529 | #define __glibcpp_wchar_t_max __glibcpp_u8_max | |
530 | #define __glibcpp_wchar_t_digits __glibcpp_u8_digits | |
531 | #define __glibcpp_wchar_t_digits10 __glibcpp_u8_digits10 | |
532 | #elif __glibcpp_wchar_t_bits == 16 | |
533 | #define __glibcpp_wchar_t_min __glibcpp_u16_min | |
534 | #define __glibcpp_wchar_t_max __glibcpp_u16_max | |
535 | #define __glibcpp_wchar_t_digits __glibcpp_u16_digits | |
536 | #define __glibcpp_wchar_t_digits10 __glibcpp_u16_digits10 | |
537 | #elif __glibcpp_wchar_t_bits == 32 | |
538 | #define __glibcpp_wchar_t_min (wchar_t)__glibcpp_u32_min | |
539 | #define __glibcpp_wchar_t_max (wchar_t)__glibcpp_u32_max | |
540 | #define __glibcpp_wchar_t_digits __glibcpp_u32_digits | |
541 | #define __glibcpp_wchar_t_digits10 __glibcpp_u32_digits10 | |
542 | #elif __glibcpp_wchar_t_bits == 64 | |
543 | #define __glibcpp_wchar_t_min (wchar_t)__glibcpp_u64_min | |
544 | #define __glibcpp_wchar_t_max (wchar_t)__glibcpp_u64_max | |
545 | #define __glibcpp_wchar_t_digits __glibcpp_u64_digits | |
546 | #define __glibcpp_wchar_t_digits10 __glibcpp_u64_digits10 | |
547 | #else | |
548 | // You must define these macros in the configuration file. | |
549 | #endif | |
550 | #endif | |
551 | ||
552 | // float | |
553 | // | |
554 | ||
555 | #if __glibcpp_float_bits == 32 | |
556 | #define __glibcpp_float_min __glibcpp_f32_min | |
557 | #define __glibcpp_float_max __glibcpp_f32_max | |
558 | #define __glibcpp_float_digits __glibcpp_f32_digits | |
559 | #define __glibcpp_float_digits10 __glibcpp_f32_digits10 | |
560 | #define __glibcpp_float_radix __glibcpp_f32_radix | |
561 | #define __glibcpp_float_epsilon __glibcpp_f32_epsilon | |
562 | #define __glibcpp_float_round_error __glibcpp_f32_round_error | |
563 | #define __glibcpp_float_min_exponent __glibcpp_f32_min_exponent | |
564 | #define __glibcpp_float_min_exponent10 __glibcpp_f32_min_exponent10 | |
565 | #define __glibcpp_float_max_exponent __glibcpp_f32_max_exponent | |
566 | #define __glibcpp_float_max_exponent10 __glibcpp_f32_max_exponent10 | |
567 | #elif __glibcpp_float_bits == 64 | |
568 | #define __glibcpp_float_min __glibcpp_f64_min | |
569 | #define __glibcpp_float_max __glibcpp_f64_max | |
570 | #define __glibcpp_float_digits __glibcpp_f64_digits | |
571 | #define __glibcpp_float_digits10 __glibcpp_f64_digits10 | |
572 | #define __glibcpp_float_radix __glibcpp_f64_radix | |
573 | #define __glibcpp_float_epsilon __glibcpp_f64_epsilon | |
574 | #define __glibcpp_float_round_error __glibcpp_f64_round_error | |
575 | #define __glibcpp_float_min_exponent __glibcpp_f64_min_exponent | |
576 | #define __glibcpp_float_min_exponent10 __glibcpp_f64_min_exponent10 | |
577 | #define __glibcpp_float_max_exponent __glibcpp_f64_max_exponent | |
578 | #define __glibcpp_float_max_exponent10 __glibcpp_f64_max_exponent10 | |
579 | #elif __glibcpp_float_bits == 80 | |
580 | #define __glibcpp_float_min __glibcpp_f80_min | |
581 | #define __glibcpp_float_max __glibcpp_f80_max | |
582 | #define __glibcpp_float_digits __glibcpp_f80_digits | |
583 | #define __glibcpp_float_digits10 __glibcpp_f80_digits10 | |
584 | #define __glibcpp_float_radix __glibcpp_f80_radix | |
585 | #define __glibcpp_float_epsilon __glibcpp_f80_epsilon | |
586 | #define __glibcpp_float_round_error __glibcpp_f80_round_error | |
587 | #define __glibcpp_float_min_exponent __glibcpp_f80_min_exponent | |
588 | #define __glibcpp_float_min_exponent10 __glibcpp_f80_min_exponent10 | |
589 | #define __glibcpp_float_max_exponent __glibcpp_f80_max_exponent | |
590 | #define __glibcpp_float_max_exponent10 __glibcpp_f80_max_exponent10 | |
591 | #else | |
592 | // You must define these macros in the configuration file. | |
593 | #endif | |
594 | ||
595 | // FIXME: These are just stubs and inkorrect | |
596 | ||
597 | #ifndef __glibcpp_float_has_infinity | |
598 | #define __glibcpp_float_has_infinity false | |
599 | #endif | |
600 | ||
601 | #ifndef __glibcpp_float_has_quiet_NaM | |
602 | #define __glibcpp_float_has_quiet_NaN false | |
603 | #endif | |
604 | ||
605 | #ifndef __glibcpp_float_has_signaling_NaN | |
606 | #define __glibcpp_float_has_signaling_NaN false | |
607 | #endif | |
608 | ||
609 | #ifndef __glibcpp_float_has_denorm | |
610 | #define __glibcpp_float_has_denorm denorm_absent | |
611 | #endif | |
612 | ||
613 | #ifndef __glibcpp_float_has_denorm_loss | |
614 | #define __glibcpp_float_has_denorm_loss false | |
615 | #endif | |
616 | ||
617 | #ifndef __glibcpp_float_infinity | |
618 | #define __glibcpp_float_infinity 0.0F | |
619 | #endif | |
620 | ||
621 | #ifndef __glibcpp_float_quiet_NaN | |
622 | #define __glibcpp_float_quiet_NaN 0.0F | |
623 | #endif | |
624 | ||
625 | #ifndef __glibcpp_float_signaling_NaN | |
626 | #define __glibcpp_float_signaling_NaN 0.0F | |
627 | #endif | |
628 | ||
629 | #ifndef __glibcpp_float_denorm_min | |
630 | #define __glibcpp_float_denorm_min 0.0F | |
631 | #endif | |
632 | ||
633 | #ifndef __glibcpp_float_is_iec559 | |
634 | #define __glibcpp_float_is_iec559 false | |
635 | #endif | |
636 | ||
637 | #ifndef __glibcpp_float_is_bounded | |
638 | #define __glibcpp_float_is_bounded true | |
639 | #endif | |
640 | ||
641 | #ifndef __glibcpp_float_is_modulo | |
642 | #define __glibcpp_float_is_modulo false | |
643 | #endif | |
644 | ||
645 | #ifndef __glibcpp_float_traps | |
646 | #define __glibcpp_float_traps false | |
647 | #endif | |
648 | ||
649 | #ifndef __glibcpp_float_tinyness_before | |
650 | #define __glibcpp_float_tinyness_before false | |
651 | #endif | |
652 | ||
653 | #ifndef __glibcpp_float_round_style | |
654 | #define __glibcpp_float_round_style round_toward_zero | |
655 | #endif | |
656 | ||
657 | // double | |
658 | ||
659 | #if __glibcpp_double_bits == 32 | |
660 | #define __glibcpp_double_min __glibcpp_f32_min | |
661 | #define __glibcpp_double_max __glibcpp_f32_max | |
662 | #define __glibcpp_double_digits __glibcpp_f32_digits | |
663 | #define __glibcpp_double_digits10 __glibcpp_f32_digits10 | |
664 | #define __glibcpp_double_radix __glibcpp_f32_radix | |
665 | #define __glibcpp_double_epsilon __glibcpp_f32_epsilon | |
666 | #define __glibcpp_double_round_error __glibcpp_f32_round_error | |
667 | #define __glibcpp_double_min_exponent __glibcpp_f32_min_exponent | |
668 | #define __glibcpp_double_min_exponent10 __glibcpp_f32_min_exponent10 | |
669 | #define __glibcpp_double_max_exponent __glibcpp_f32_max_exponent | |
670 | #define __glibcpp_double_max_exponent10 __glibcpp_f32_max_exponent10 | |
671 | #elif __glibcpp_double_bits == 64 | |
672 | #define __glibcpp_double_min __glibcpp_f64_min | |
673 | #define __glibcpp_double_max __glibcpp_f64_max | |
674 | #define __glibcpp_double_digits __glibcpp_f64_digits | |
675 | #define __glibcpp_double_digits10 __glibcpp_f64_digits10 | |
676 | #define __glibcpp_double_radix __glibcpp_f64_radix | |
677 | #define __glibcpp_double_epsilon __glibcpp_f64_epsilon | |
678 | #define __glibcpp_double_round_error __glibcpp_f64_round_error | |
679 | #define __glibcpp_double_min_exponent __glibcpp_f64_min_exponent | |
680 | #define __glibcpp_double_min_exponent10 __glibcpp_f64_min_exponent10 | |
681 | #define __glibcpp_double_max_exponent __glibcpp_f64_max_exponent | |
682 | #define __glibcpp_double_max_exponent10 __glibcpp_f64_max_exponent10 | |
683 | #elif __glibcpp_double_bits == 80 | |
684 | #define __glibcpp_double_min __glibcpp_f80_min | |
685 | #define __glibcpp_double_max __glibcpp_f80_max | |
686 | #define __glibcpp_double_digits __glibcpp_f80_digits | |
687 | #define __glibcpp_double_digits10 __glibcpp_f80_digits10 | |
688 | #define __glibcpp_double_radix __glibcpp_f80_radix | |
689 | #define __glibcpp_double_epsilon __glibcpp_f80_epsilon | |
690 | #define __glibcpp_double_round_error __glibcpp_f80_round_error | |
691 | #define __glibcpp_double_min_exponent __glibcpp_f80_min_exponent | |
692 | #define __glibcpp_double_min_exponent10 __glibcpp_f80_min_exponent10 | |
693 | #define __glibcpp_double_max_exponent __glibcpp_f80_max_exponent | |
694 | #define __glibcpp_double_max_exponent10 __glibcpp_f80_max_exponent10 | |
695 | #else | |
696 | // You must define these macros in the configuration file. | |
697 | #endif | |
698 | ||
699 | // FIXME: These are just stubs and inkorrect | |
700 | ||
701 | #ifndef __glibcpp_double_has_infinity | |
702 | #define __glibcpp_double_has_infinity false | |
703 | #endif | |
704 | ||
705 | #ifndef __glibcpp_double_has_quiet_NaM | |
706 | #define __glibcpp_double_has_quiet_NaN false | |
707 | #endif | |
708 | ||
709 | #ifndef __glibcpp_double_has_signaling_NaN | |
710 | #define __glibcpp_double_has_signaling_NaN false | |
711 | #endif | |
712 | ||
713 | #ifndef __glibcpp_double_has_denorm | |
714 | #define __glibcpp_double_has_denorm denorm_absent | |
715 | #endif | |
716 | ||
717 | #ifndef __glibcpp_double_has_denorm_loss | |
718 | #define __glibcpp_double_has_denorm_loss false | |
719 | #endif | |
720 | ||
721 | #ifndef __glibcpp_double_infinity | |
722 | #define __glibcpp_double_infinity 0.0 | |
723 | #endif | |
724 | ||
725 | #ifndef __glibcpp_double_quiet_NaN | |
726 | #define __glibcpp_double_quiet_NaN 0.0 | |
727 | #endif | |
728 | ||
729 | #ifndef __glibcpp_double_signaling_NaN | |
730 | #define __glibcpp_double_signaling_NaN 0.0 | |
731 | #endif | |
732 | ||
733 | #ifndef __glibcpp_double_denorm_min | |
734 | #define __glibcpp_double_denorm_min 0.0 | |
735 | #endif | |
736 | ||
737 | #ifndef __glibcpp_double_is_iec559 | |
738 | #define __glibcpp_double_is_iec559 false | |
739 | #endif | |
740 | ||
741 | #ifndef __glibcpp_double_is_bounded | |
742 | #define __glibcpp_double_is_bounded true | |
743 | #endif | |
744 | ||
745 | #ifndef __glibcpp_double_is_modulo | |
746 | #define __glibcpp_double_is_modulo false | |
747 | #endif | |
748 | ||
749 | #ifndef __glibcpp_double_traps | |
750 | #define __glibcpp_double_traps false | |
751 | #endif | |
752 | ||
753 | #ifndef __glibcpp_double_tinyness_before | |
754 | #define __glibcpp_double_tinyness_before false | |
755 | #endif | |
756 | ||
757 | #ifndef __glibcpp_double_round_style | |
758 | #define __glibcpp_double_round_style round_toward_zero | |
759 | #endif | |
760 | ||
761 | // long double | |
762 | ||
763 | #if __glibcpp_long_double_bits == 32 | |
764 | #define __glibcpp_long_double_min __glibcpp_f32_min | |
765 | #define __glibcpp_long_double_max __glibcpp_f32_max | |
766 | #define __glibcpp_long_double_digits __glibcpp_f32_digits | |
767 | #define __glibcpp_long_double_digits10 __glibcpp_f32_digits10 | |
768 | #define __glibcpp_long_double_radix __glibcpp_f32_radix | |
769 | #define __glibcpp_long_double_epsilon __glibcpp_f32_epsilon | |
770 | #define __glibcpp_long_double_round_error __glibcpp_f32_round_error | |
771 | #define __glibcpp_long_double_min_exponent __glibcpp_f32_min_exponent | |
772 | #define __glibcpp_long_double_min_exponent10 __glibcpp_f32_min_exponent10 | |
773 | #define __glibcpp_long_double_max_exponent __glibcpp_f32_max_exponent | |
774 | #define __glibcpp_long_double_max_exponent10 __glibcpp_f32_max_exponent10 | |
775 | #elif __glibcpp_long_double_bits == 64 | |
776 | #define __glibcpp_long_double_min __glibcpp_f64_min | |
777 | #define __glibcpp_long_double_max __glibcpp_f64_max | |
778 | #define __glibcpp_long_double_digits __glibcpp_f64_digits | |
779 | #define __glibcpp_long_double_digits10 __glibcpp_f64_digits10 | |
780 | #define __glibcpp_long_double_radix __glibcpp_f64_radix | |
781 | #define __glibcpp_long_double_epsilon __glibcpp_f64_epsilon | |
782 | #define __glibcpp_long_double_round_error __glibcpp_f64_round_error | |
783 | #define __glibcpp_long_double_min_exponent __glibcpp_f64_min_exponent | |
784 | #define __glibcpp_long_double_min_exponent10 __glibcpp_f64_min_exponent10 | |
785 | #define __glibcpp_long_double_max_exponent __glibcpp_f64_max_exponent | |
786 | #define __glibcpp_long_double_max_exponent10 __glibcpp_f64_max_exponent10 | |
787 | #elif __glibcpp_long_double_bits == 80 | |
788 | #define __glibcpp_long_double_min __glibcpp_f80_min | |
789 | #define __glibcpp_long_double_max __glibcpp_f80_max | |
790 | #define __glibcpp_long_double_digits __glibcpp_f80_digits | |
791 | #define __glibcpp_long_double_digits10 __glibcpp_f80_digits10 | |
792 | #define __glibcpp_long_double_radix __glibcpp_f80_radix | |
793 | #define __glibcpp_long_double_epsilon __glibcpp_f80_epsilon | |
794 | #define __glibcpp_long_double_round_error __glibcpp_f80_round_error | |
795 | #define __glibcpp_long_double_min_exponent __glibcpp_f80_min_exponent | |
796 | #define __glibcpp_long_double_min_exponent10 __glibcpp_f80_min_exponent10 | |
797 | #define __glibcpp_long_double_max_exponent __glibcpp_f80_max_exponent | |
798 | #define __glibcpp_long_double_max_exponent10 __glibcpp_f80_max_exponent10 | |
799 | #elif __glibcpp_long_double_bits == 96 | |
800 | #define __glibcpp_long_double_min __glibcpp_f96_min | |
801 | #define __glibcpp_long_double_max __glibcpp_f96_max | |
802 | #define __glibcpp_long_double_digits __glibcpp_f96_digits | |
803 | #define __glibcpp_long_double_digits10 __glibcpp_f96_digits10 | |
804 | #define __glibcpp_long_double_radix __glibcpp_f96_radix | |
805 | #define __glibcpp_long_double_epsilon __glibcpp_f96_epsilon | |
806 | #define __glibcpp_long_double_round_error __glibcpp_f96_round_error | |
807 | #define __glibcpp_long_double_min_exponent __glibcpp_f96_min_exponent | |
808 | #define __glibcpp_long_double_min_exponent10 __glibcpp_f96_min_exponent10 | |
809 | #define __glibcpp_long_double_max_exponent __glibcpp_f96_max_exponent | |
810 | #define __glibcpp_long_double_max_exponent10 __glibcpp_f96_max_exponent10 | |
811 | #elif __glibcpp_long_double_bits == 128 | |
812 | #define __glibcpp_long_double_min __glibcpp_f128_min | |
813 | #define __glibcpp_long_double_max __glibcpp_f128_max | |
814 | #define __glibcpp_long_double_digits __glibcpp_f128_digits | |
815 | #define __glibcpp_long_double_digits10 __glibcpp_f128_digits10 | |
816 | #define __glibcpp_long_double_radix __glibcpp_f128_radix | |
817 | #define __glibcpp_long_double_epsilon __glibcpp_f128_epsilon | |
818 | #define __glibcpp_long_double_round_error __glibcpp_f128_round_error | |
819 | #define __glibcpp_long_double_min_exponent __glibcpp_f128_min_exponent | |
820 | #define __glibcpp_long_double_min_exponent10 __glibcpp_f128_min_exponent10 | |
821 | #define __glibcpp_long_double_max_exponent __glibcpp_f128_max_exponent | |
822 | #define __glibcpp_long_double_max_exponent10 __glibcpp_f128_max_exponent10 | |
823 | #else | |
824 | // You must define these macros in the configuration file. | |
825 | #endif | |
826 | ||
827 | // FIXME: These are just stubs and inkorrect | |
828 | ||
829 | #ifndef __glibcpp_long_double_has_infinity | |
830 | #define __glibcpp_long_double_has_infinity false | |
831 | #endif | |
832 | ||
833 | #ifndef __glibcpp_long_double_has_quiet_NaN | |
834 | #define __glibcpp_long_double_has_quiet_NaN false | |
835 | #endif | |
836 | ||
837 | #ifndef __glibcpp_long_double_has_signaling_NaN | |
838 | #define __glibcpp_long_double_has_signaling_NaN false | |
839 | #endif | |
840 | ||
841 | #ifndef __glibcpp_long_double_has_denorm | |
842 | #define __glibcpp_long_double_has_denorm denorm_absent | |
843 | #endif | |
844 | ||
845 | #ifndef __glibcpp_long_double_has_denorm_loss | |
846 | #define __glibcpp_long_double_has_denorm_loss false | |
847 | #endif | |
848 | ||
849 | #ifndef __glibcpp_long_double_infinity | |
850 | #define __glibcpp_long_double_infinity 0.0L | |
851 | #endif | |
852 | ||
853 | #ifndef __glibcpp_long_double_quiet_NaN | |
854 | #define __glibcpp_long_double_quiet_NaN 0.0L | |
855 | #endif | |
856 | ||
857 | #ifndef __glibcpp_long_double_signaling_NaN | |
858 | #define __glibcpp_long_double_signaling_NaN 0.0L | |
859 | #endif | |
860 | ||
861 | #ifndef __glibcpp_long_double_denorm_min | |
862 | #define __glibcpp_long_double_denorm_min 0.0L | |
863 | #endif | |
864 | ||
865 | #ifndef __glibcpp_long_double_is_iec559 | |
866 | #define __glibcpp_long_double_is_iec559 false | |
867 | #endif | |
868 | ||
869 | #ifndef __glibcpp_long_double_is_bounded | |
870 | #define __glibcpp_long_double_is_bounded true | |
871 | #endif | |
872 | ||
873 | #ifndef __glibcpp_long_double_is_modulo | |
874 | #define __glibcpp_long_double_is_modulo false | |
875 | #endif | |
876 | ||
877 | #ifndef __glibcpp_long_double_traps | |
878 | #define __glibcpp_long_double_traps false | |
879 | #endif | |
880 | ||
881 | #ifndef __glibcpp_long_double_tinyness_before | |
882 | #define __glibcpp_long_double_tinyness_before false | |
725dc051 | 883 | #endif |
54c1bf78 BK |
884 | |
885 | #ifndef __glibcpp_long_double_round_style | |
886 | #define __glibcpp_long_double_round_style round_toward_zero | |
887 | #endif | |
888 | ||
889 | ||
890 | namespace std | |
891 | { | |
892 | enum float_round_style | |
893 | { | |
894 | round_indeterminate = -1, | |
895 | round_toward_zero = 0, | |
896 | round_to_nearest = 1, | |
897 | round_toward_infinity = 2, | |
898 | round_toward_neg_infinity = 3 | |
899 | }; | |
900 | ||
901 | enum float_denorm_style | |
902 | { | |
903 | denorm_indeterminate = -1, | |
904 | denorm_absent = 0, | |
905 | denorm_present = 1 | |
906 | }; | |
907 | ||
908 | // | |
909 | // The primary class traits | |
910 | // | |
911 | template<typename _Tp> | |
912 | struct numeric_limits | |
913 | { | |
914 | static const bool is_specialized = false; | |
915 | ||
916 | static _Tp min() throw() { return static_cast<_Tp>(0); } | |
917 | static _Tp max() throw() { return static_cast<_Tp>(0); } | |
918 | ||
919 | static const int digits = 0; | |
920 | static const int digits10 = 0; | |
921 | static const bool is_signed = false; | |
922 | static const bool is_integer = false; | |
923 | static const bool is_exact = false; | |
924 | static const int radix = 0; | |
925 | ||
926 | static _Tp epsilon() throw() { return static_cast<_Tp>(0); } | |
927 | static _Tp round_error() throw() { return static_cast<_Tp>(0); } | |
928 | ||
929 | static const int min_exponent = 0; | |
930 | static const int min_exponent10 = 0; | |
931 | static const int max_exponent = 0; | |
932 | static const int max_exponent10 = 0; | |
933 | ||
934 | static const bool has_infinity = false; | |
935 | static const bool has_quiet_NaN = false; | |
936 | static const bool has_signaling_NaN = false; | |
937 | static const float_denorm_style has_denorm = denorm_absent; | |
938 | static const bool has_denorm_loss = false; | |
939 | ||
940 | static _Tp infinity() throw() { return static_cast<_Tp>(0); } | |
941 | static _Tp quiet_NaN() throw() { return static_cast<_Tp>(0); } | |
942 | static _Tp signaling_NaN() throw() { return static_cast<_Tp>(0); } | |
943 | static _Tp denorm_min() throw() { return static_cast<_Tp>(0); } | |
944 | ||
945 | static const bool is_iec559 = false; | |
946 | static const bool is_bounded = false; | |
947 | static const bool is_modulo = false; | |
948 | ||
949 | static const bool traps = false; | |
950 | static const bool tinyness_before = false; | |
951 | static const float_round_style round_style = round_toward_zero; | |
952 | }; | |
953 | ||
954 | template<typename _Tp> | |
955 | const bool | |
956 | numeric_limits<_Tp>::is_specialized; | |
957 | ||
958 | template<typename _Tp> | |
959 | const int | |
960 | numeric_limits<_Tp>::digits; | |
961 | ||
962 | template<typename _Tp> | |
963 | const int | |
964 | numeric_limits<_Tp>::digits10; | |
965 | ||
966 | template<typename _Tp> | |
967 | const bool | |
968 | numeric_limits<_Tp>::is_signed; | |
969 | ||
970 | template<typename _Tp> | |
971 | const bool | |
972 | numeric_limits<_Tp>::is_integer; | |
973 | ||
974 | template<typename _Tp> | |
975 | const bool | |
976 | numeric_limits<_Tp>::is_exact; | |
977 | ||
978 | template<typename _Tp> | |
979 | const int | |
980 | numeric_limits<_Tp>::radix; | |
981 | ||
982 | template<typename _Tp> | |
983 | const int | |
984 | numeric_limits<_Tp>::min_exponent; | |
985 | ||
986 | template<typename _Tp> | |
987 | const int | |
988 | numeric_limits<_Tp>::min_exponent10; | |
989 | ||
990 | template<typename _Tp> | |
991 | const int | |
992 | numeric_limits<_Tp>::max_exponent; | |
993 | ||
994 | template<typename _Tp> | |
995 | const int | |
996 | numeric_limits<_Tp>::max_exponent10; | |
997 | ||
998 | template<typename _Tp> | |
999 | const bool | |
1000 | numeric_limits<_Tp>::has_infinity; | |
1001 | ||
1002 | template<typename _Tp> | |
1003 | const bool | |
1004 | numeric_limits<_Tp>::has_quiet_NaN; | |
1005 | ||
1006 | template<typename _Tp> | |
1007 | const bool | |
1008 | numeric_limits<_Tp>::has_signaling_NaN; | |
1009 | ||
1010 | template<typename _Tp> | |
1011 | const float_denorm_style | |
1012 | numeric_limits<_Tp>::has_denorm; | |
1013 | ||
1014 | template<typename _Tp> | |
1015 | const bool | |
1016 | numeric_limits<_Tp>::has_denorm_loss; | |
1017 | ||
1018 | template<typename _Tp> | |
1019 | const bool | |
1020 | numeric_limits<_Tp>::is_iec559; | |
1021 | ||
1022 | template<typename _Tp> | |
1023 | const bool | |
1024 | numeric_limits<_Tp>::is_bounded; | |
1025 | ||
1026 | template<typename _Tp> | |
1027 | const bool | |
1028 | numeric_limits<_Tp>::is_modulo; | |
1029 | ||
1030 | template<typename _Tp> | |
1031 | const bool | |
1032 | numeric_limits<_Tp>::traps; | |
1033 | ||
1034 | template<typename _Tp> | |
1035 | const bool | |
1036 | numeric_limits<_Tp>::tinyness_before; | |
1037 | ||
1038 | template<typename _Tp> | |
1039 | const float_round_style | |
1040 | numeric_limits<_Tp>::round_style; | |
1041 | ||
1042 | // Now there follow 15 explicit specializations. Yes, 15. Make sure | |
1043 | // you get the count right. | |
1044 | ||
1045 | template<> | |
1046 | struct numeric_limits<bool> | |
1047 | { | |
1048 | static const bool is_specialized = true; | |
1049 | ||
1050 | static bool min() throw() | |
1051 | { return false; } | |
1052 | ||
1053 | static bool max() throw() | |
1054 | { return true; } | |
1055 | ||
1056 | static const int digits = __glibcpp_bool_digits; | |
1057 | static const int digits10 = 0; | |
1058 | static const bool is_signed = false; | |
1059 | static const bool is_integer = true; | |
1060 | static const bool is_exact = true; | |
1061 | static const int radix = 2; | |
1062 | static bool epsilon() throw() | |
1063 | { return false; } | |
1064 | static bool round_error() throw() | |
1065 | { return false; } | |
1066 | ||
1067 | static const int min_exponent = 0; | |
1068 | static const int min_exponent10 = 0; | |
1069 | static const int max_exponent = 0; | |
1070 | static const int max_exponent10 = 0; | |
1071 | ||
1072 | static const bool has_infinity = false; | |
1073 | static const bool has_quiet_NaN = false; | |
1074 | static const bool has_signaling_NaN = false; | |
1075 | static const float_denorm_style has_denorm = denorm_absent; | |
1076 | static const bool has_denorm_loss = false; | |
1077 | ||
1078 | static bool infinity() throw() | |
1079 | { return false; } | |
1080 | static bool quiet_NaN() throw() | |
1081 | { return false; } | |
1082 | static bool signaling_NaN() throw() | |
1083 | { return false; } | |
1084 | static bool denorm_min() throw() | |
1085 | { return false; } | |
1086 | ||
1087 | static const bool is_iec559 = true; | |
1088 | static const bool is_bounded = true; | |
1089 | static const bool is_modulo = true; | |
1090 | ||
1091 | // It is not clear what it means for a boolean type to trap. | |
1092 | // This is a DR on the LWG issue list. Here, I use integer | |
1093 | // promotion semantics. | |
1094 | static const bool traps = __glibcpp_signed_int_traps | |
1095 | || __glibcpp_signed_long_traps; | |
1096 | static const bool tinyness_before = false; | |
1097 | static const float_round_style round_style = round_toward_zero; | |
1098 | }; | |
1099 | ||
1100 | #undef __glibcpp_bool_digits | |
1101 | ||
1102 | template<> | |
1103 | struct numeric_limits<char> | |
1104 | { | |
1105 | static const bool is_specialized = true; | |
1106 | ||
1107 | static char min() throw() | |
1108 | { return __glibcpp_char_min; } | |
1109 | static char max() throw() | |
1110 | { return __glibcpp_char_max; } | |
1111 | ||
1112 | static const int digits = __glibcpp_char_digits; | |
1113 | static const int digits10 = __glibcpp_char_digits10; | |
1114 | static const bool is_signed = __glibcpp_plain_char_is_signed; | |
1115 | static const bool is_integer = true; | |
1116 | static const bool is_exact = true; | |
1117 | static const int radix = 2; | |
1118 | static char epsilon() throw() | |
1119 | { return char(); } | |
1120 | static char round_error() throw() | |
1121 | { return char(); } | |
1122 | ||
1123 | static const int min_exponent = 0; | |
1124 | static const int min_exponent10 = 0; | |
1125 | static const int max_exponent = 0; | |
1126 | static const int max_exponent10 = 0; | |
1127 | ||
1128 | static const bool has_infinity = false; | |
1129 | static const bool has_quiet_NaN = false; | |
1130 | static const bool has_signaling_NaN = false; | |
1131 | static const float_denorm_style has_denorm = denorm_absent; | |
1132 | static const bool has_denorm_loss = false; | |
1133 | ||
1134 | static char infinity() throw() | |
1135 | { return char(); } | |
1136 | static char quiet_NaN() throw() | |
1137 | { return char(); } | |
1138 | static char signaling_NaN() throw() | |
1139 | { return char(); } | |
1140 | static char denorm_min() throw() | |
1141 | { return static_cast<char>(0); } | |
1142 | ||
1143 | static const bool is_iec559 = false; | |
1144 | static const bool is_bounded = true; | |
1145 | static const bool is_modulo = __glibcpp_char_is_modulo; | |
1146 | ||
1147 | static const bool traps = __glibcpp_char_traps; | |
1148 | static const bool tinyness_before = false; | |
1149 | static const float_round_style round_style = round_toward_zero; | |
1150 | }; | |
1151 | ||
1152 | #undef __glibcpp_char_min | |
1153 | #undef __glibcpp_char_max | |
1154 | #undef __glibcpp_char_digits | |
1155 | #undef __glibcpp_char_digits10 | |
1156 | #undef __glibcpp_char_is_signed | |
1157 | #undef __glibcpp_char_is_modulo | |
1158 | #undef __glibcpp_char_traps | |
1159 | ||
1160 | ||
1161 | ||
1162 | template<> | |
1163 | struct numeric_limits<signed char> | |
1164 | { | |
1165 | static const bool is_specialized = true; | |
1166 | ||
1167 | static signed char min() throw() | |
1168 | { return __glibcpp_signed_char_min; } | |
1169 | static signed char max() throw() | |
1170 | { return __glibcpp_signed_char_max; } | |
1171 | ||
1172 | static const int digits = __glibcpp_signed_char_digits; | |
1173 | static const int digits10 = __glibcpp_signed_char_digits10; | |
1174 | static const bool is_signed = true; | |
1175 | static const bool is_integer = true; | |
1176 | static const bool is_exact = true; | |
1177 | static const int radix = 2; | |
1178 | static signed char epsilon() throw() | |
1179 | { return 0; } | |
1180 | static signed char round_error() throw() | |
1181 | { return 0; } | |
1182 | ||
1183 | static const int min_exponent = 0; | |
1184 | static const int min_exponent10 = 0; | |
1185 | static const int max_exponent = 0; | |
1186 | static const int max_exponent10 = 0; | |
1187 | ||
1188 | static const bool has_infinity = false; | |
1189 | static const bool has_quiet_NaN = false; | |
1190 | static const bool has_signaling_NaN = false; | |
1191 | static const float_denorm_style has_denorm = denorm_absent; | |
1192 | static const bool has_denorm_loss = false; | |
1193 | ||
1194 | static signed char infinity() throw() | |
1195 | { return static_cast<signed char>(0); } | |
1196 | static signed char quiet_NaN() throw() | |
1197 | { return static_cast<signed char>(0); } | |
1198 | static signed char signaling_NaN() throw() | |
1199 | { return static_cast<signed char>(0); } | |
1200 | static signed char denorm_min() throw() | |
1201 | { return static_cast<signed char>(0); } | |
1202 | ||
1203 | static const bool is_iec559 = false; | |
1204 | static const bool is_bounded = true; | |
1205 | static const bool is_modulo = __glibcpp_signed_char_is_modulo; | |
1206 | ||
1207 | static const bool traps = __glibcpp_signed_char_traps; | |
1208 | static const bool tinyness_before = false; | |
1209 | static const float_round_style round_style = round_toward_zero; | |
1210 | }; | |
1211 | ||
1212 | #undef __glibcpp_signed_char_min | |
1213 | #undef __glibcpp_signed_char_max | |
1214 | #undef __glibcpp_signed_char_digits | |
1215 | #undef __glibcpp_signed_char_digits10 | |
1216 | #undef __glibcpp_signed_char_is_modulo | |
1217 | #undef __glibcpp_signed_char_traps | |
1218 | ||
1219 | template<> | |
1220 | struct numeric_limits<unsigned char> | |
1221 | { | |
1222 | static const bool is_specialized = true; | |
1223 | ||
1224 | static unsigned char min() throw() | |
1225 | { return 0; } | |
1226 | static unsigned char max() throw() | |
1227 | { return __glibcpp_unsigned_char_max; } | |
1228 | ||
1229 | static const int digits = __glibcpp_unsigned_char_digits; | |
1230 | static const int digits10 = __glibcpp_unsigned_char_digits10; | |
1231 | static const bool is_signed = false; | |
1232 | static const bool is_integer = true; | |
1233 | static const bool is_exact = true; | |
1234 | static const int radix = 2; | |
1235 | static unsigned char epsilon() throw() | |
1236 | { return 0; } | |
1237 | static unsigned char round_error() throw() | |
1238 | { return 0; } | |
1239 | ||
1240 | static const int min_exponent = 0; | |
1241 | static const int min_exponent10 = 0; | |
1242 | static const int max_exponent = 0; | |
1243 | static const int max_exponent10 = 0; | |
1244 | ||
1245 | static const bool has_infinity = false; | |
1246 | static const bool has_quiet_NaN = false; | |
1247 | static const bool has_signaling_NaN = false; | |
1248 | static const float_denorm_style has_denorm = denorm_absent; | |
1249 | static const bool has_denorm_loss = false; | |
1250 | ||
1251 | static unsigned char infinity() throw() | |
1252 | { return static_cast<unsigned char>(0); } | |
1253 | static unsigned char quiet_NaN() throw() | |
1254 | { return static_cast<unsigned char>(0); } | |
1255 | static unsigned char signaling_NaN() throw() | |
1256 | { return static_cast<unsigned char>(0); } | |
1257 | static unsigned char denorm_min() throw() | |
1258 | { return static_cast<unsigned char>(0); } | |
1259 | ||
1260 | static const bool is_iec559 = false; | |
1261 | static const bool is_bounded = true; | |
1262 | static const bool is_modulo = true; | |
1263 | ||
1264 | static const bool traps = __glibcpp_unsigned_char_traps; | |
1265 | static const bool tinyness_before = false; | |
1266 | static const float_round_style round_style = round_toward_zero; | |
1267 | }; | |
1268 | ||
1269 | #undef __glibcpp_unsigned_char_max | |
1270 | #undef __glibcpp_unsigned_char_digits | |
1271 | #undef __glibcpp_unsigned_char_digits10 | |
1272 | #undef __glibcpp_unsigned_char_traps | |
1273 | ||
1274 | template<> | |
1275 | struct numeric_limits<wchar_t> | |
1276 | { | |
1277 | static const bool is_specialized = true; | |
1278 | ||
1279 | static wchar_t min() throw() | |
1280 | { return __glibcpp_wchar_t_min; } | |
1281 | static wchar_t max() throw() | |
1282 | { return __glibcpp_wchar_t_max; } | |
1283 | ||
1284 | static const int digits = __glibcpp_wchar_t_digits; | |
1285 | static const int digits10 = __glibcpp_wchar_t_digits10; | |
1286 | static const bool is_signed = __glibcpp_wchar_t_is_signed; | |
1287 | static const bool is_integer = true; | |
1288 | static const bool is_exact = true; | |
1289 | static const int radix = 2; | |
1290 | static wchar_t epsilon() throw() | |
1291 | { return 0; } | |
1292 | static wchar_t round_error() throw() | |
1293 | { return 0; } | |
1294 | ||
1295 | static const int min_exponent = 0; | |
1296 | static const int min_exponent10 = 0; | |
1297 | static const int max_exponent = 0; | |
1298 | static const int max_exponent10 = 0; | |
1299 | ||
1300 | static const bool has_infinity = false; | |
1301 | static const bool has_quiet_NaN = false; | |
1302 | static const bool has_signaling_NaN = false; | |
1303 | static const float_denorm_style has_denorm = denorm_absent; | |
1304 | static const bool has_denorm_loss = false; | |
1305 | ||
1306 | static wchar_t infinity() throw() | |
1307 | { return wchar_t(); } | |
1308 | static wchar_t quiet_NaN() throw() | |
1309 | { return wchar_t(); } | |
1310 | static wchar_t signaling_NaN() throw() | |
1311 | { return wchar_t(); } | |
1312 | static wchar_t denorm_min() throw() | |
1313 | { return wchar_t(); } | |
1314 | ||
1315 | static const bool is_iec559 = false; | |
1316 | static const bool is_bounded = true; | |
1317 | static const bool is_modulo = __glibcpp_wchar_t_is_modulo; | |
1318 | ||
1319 | static const bool traps = __glibcpp_wchar_t_traps; | |
1320 | static const bool tinyness_before = false; | |
1321 | static const float_round_style round_style = round_toward_zero; | |
1322 | }; | |
1323 | ||
1324 | #undef __glibcpp_wchar_t_min | |
1325 | #undef __glibcpp_wchar_t_max | |
1326 | #undef __glibcpp_wchar_t_digits | |
1327 | #undef __glibcpp_wchar_t_digits10 | |
1328 | #undef __glibcpp_wchar_t_is_signed | |
1329 | #undef __glibcpp_wchar_t_is_modulo | |
1330 | #undef __glibcpp_wchar_t_traps | |
1331 | ||
1332 | template<> | |
1333 | struct numeric_limits<short> | |
1334 | { | |
1335 | static const bool is_specialized = true; | |
1336 | ||
1337 | static short min() throw() | |
1338 | { return __glibcpp_signed_short_min; } | |
1339 | static short max() throw() | |
1340 | { return __glibcpp_signed_short_max; } | |
1341 | ||
1342 | static const int digits = __glibcpp_signed_short_digits; | |
1343 | static const int digits10 = __glibcpp_signed_short_digits10; | |
1344 | static const bool is_signed = true; | |
1345 | static const bool is_integer = true; | |
1346 | static const bool is_exact = true; | |
1347 | static const int radix = 2; | |
1348 | static short epsilon() throw() | |
1349 | { return 0; } | |
1350 | static short round_error() throw() | |
1351 | { return 0; } | |
1352 | ||
1353 | static const int min_exponent = 0; | |
1354 | static const int min_exponent10 = 0; | |
1355 | static const int max_exponent = 0; | |
1356 | static const int max_exponent10 = 0; | |
1357 | ||
1358 | static const bool has_infinity = false; | |
1359 | static const bool has_quiet_NaN = false; | |
1360 | static const bool has_signaling_NaN = false; | |
1361 | static const float_denorm_style has_denorm = denorm_absent; | |
1362 | static const bool has_denorm_loss = false; | |
1363 | ||
1364 | static short infinity() throw() | |
1365 | { return short(); } | |
1366 | static short quiet_NaN() throw() | |
1367 | { return short(); } | |
1368 | static short signaling_NaN() throw() | |
1369 | { return short(); } | |
1370 | static short denorm_min() throw() | |
1371 | { return short(); } | |
1372 | ||
1373 | static const bool is_iec559 = true; | |
1374 | static const bool is_bounded = true; | |
1375 | static const bool is_modulo = __glibcpp_signed_short_is_modulo; | |
1376 | ||
1377 | static const bool traps = __glibcpp_signed_short_traps; | |
1378 | static const bool tinyness_before = false; | |
1379 | static const float_round_style round_style = round_toward_zero; | |
1380 | }; | |
1381 | ||
1382 | #undef __glibcpp_signed_short_min | |
1383 | #undef __glibcpp_signed_short_max | |
1384 | #undef __glibcpp_signed_short_digits | |
1385 | #undef __glibcpp_signed_short_digits10 | |
1386 | #undef __glibcpp_signed_short_is_modulo | |
1387 | #undef __glibcpp_signed_short_traps | |
1388 | ||
1389 | template<> | |
1390 | struct numeric_limits<unsigned short> | |
1391 | { | |
1392 | static const bool is_specialized = true; | |
1393 | ||
1394 | static unsigned short min() throw() | |
1395 | { return 0; } | |
1396 | static unsigned short max() throw() | |
1397 | { return __glibcpp_unsigned_short_max; } | |
1398 | ||
1399 | static const int digits = __glibcpp_unsigned_short_digits; | |
1400 | static const int digits10 = __glibcpp_unsigned_short_digits10; | |
1401 | static const bool is_signed = false; | |
1402 | static const bool is_integer = true; | |
1403 | static const bool is_exact = true; | |
1404 | static const int radix = 2; | |
1405 | static unsigned short epsilon() throw() | |
1406 | { return 0; } | |
1407 | static unsigned short round_error() throw() | |
1408 | { return 0; } | |
1409 | ||
1410 | static const int min_exponent = 0; | |
1411 | static const int min_exponent10 = 0; | |
1412 | static const int max_exponent = 0; | |
1413 | static const int max_exponent10 = 0; | |
1414 | ||
1415 | static const bool has_infinity = false; | |
1416 | static const bool has_quiet_NaN = false; | |
1417 | static const bool has_signaling_NaN = false; | |
1418 | static const float_denorm_style has_denorm = denorm_absent; | |
1419 | static const bool has_denorm_loss = false; | |
1420 | ||
1421 | static unsigned short infinity() throw() | |
1422 | { return static_cast<unsigned short>(0); } | |
1423 | static unsigned short quiet_NaN() throw() | |
1424 | { return static_cast<unsigned short>(0); } | |
1425 | static unsigned short signaling_NaN() throw() | |
1426 | { return static_cast<unsigned short>(0); } | |
1427 | static unsigned short denorm_min() throw() | |
1428 | { return static_cast<unsigned short>(0); } | |
1429 | ||
1430 | static const bool is_iec559 = true; | |
1431 | static const bool is_bounded = true; | |
1432 | static const bool is_modulo = true; | |
1433 | ||
1434 | static const bool traps = __glibcpp_unsigned_short_traps; | |
1435 | static const bool tinyness_before = false; | |
1436 | static const float_round_style round_style = round_toward_zero; | |
1437 | }; | |
1438 | ||
1439 | #undef __glibcpp_unsigned_short_max | |
1440 | #undef __glibcpp_unsigned_short_digits | |
1441 | #undef __glibcpp_unsigned_short_digits10 | |
1442 | #undef __glibcpp_unsigned_short_traps | |
1443 | ||
1444 | template<> | |
1445 | struct numeric_limits<int> | |
1446 | { | |
1447 | static const bool is_specialized = true; | |
1448 | ||
1449 | static int min() throw() | |
1450 | { return __glibcpp_signed_int_min; } | |
1451 | static int max() throw() | |
1452 | { return __glibcpp_signed_int_max; } | |
1453 | ||
1454 | static const int digits = __glibcpp_signed_int_digits; | |
1455 | static const int digits10 = __glibcpp_signed_int_digits10; | |
1456 | static const bool is_signed = true; | |
1457 | static const bool is_integer = true; | |
1458 | static const bool is_exact = true; | |
1459 | static const int radix = 2; | |
1460 | static int epsilon() throw() | |
1461 | { return 0; } | |
1462 | static int round_error() throw() | |
1463 | { return 0; } | |
1464 | ||
1465 | static const int min_exponent = 0; | |
1466 | static const int min_exponent10 = 0; | |
1467 | static const int max_exponent = 0; | |
1468 | static const int max_exponent10 = 0; | |
1469 | ||
1470 | static const bool has_infinity = false; | |
1471 | static const bool has_quiet_NaN = false; | |
1472 | static const bool has_signaling_NaN = false; | |
1473 | static const float_denorm_style has_denorm = denorm_absent; | |
1474 | static const bool has_denorm_loss = false; | |
1475 | ||
1476 | static int infinity() throw() | |
1477 | { return static_cast<int>(0); } | |
1478 | static int quiet_NaN() throw() | |
1479 | { return static_cast<int>(0); } | |
1480 | static int signaling_NaN() throw() | |
1481 | { return static_cast<int>(0); } | |
1482 | static int denorm_min() throw() | |
1483 | { return static_cast<int>(0); } | |
1484 | ||
1485 | static const bool is_iec559 = true; | |
1486 | static const bool is_bounded = true; | |
1487 | static const bool is_modulo = __glibcpp_signed_int_is_modulo; | |
1488 | ||
1489 | static const bool traps = __glibcpp_signed_int_traps; | |
1490 | static const bool tinyness_before = false; | |
1491 | static const float_round_style round_style = round_toward_zero; | |
1492 | }; | |
1493 | ||
1494 | #undef __glibcpp_signed_int_min | |
1495 | #undef __glibcpp_signed_int_max | |
1496 | #undef __glibcpp_signed_int_digits | |
1497 | #undef __glibcpp_signed_int_digits10 | |
1498 | #undef __glibcpp_signed_int_is_modulo | |
1499 | #undef __glibcpp_signed_int_traps | |
1500 | ||
1501 | template<> | |
1502 | struct numeric_limits<unsigned int> | |
1503 | { | |
1504 | static const bool is_specialized = true; | |
1505 | ||
1506 | static unsigned int min() throw() | |
1507 | { return 0; } | |
1508 | static unsigned int max() throw() | |
1509 | { return __glibcpp_unsigned_int_max; } | |
1510 | ||
1511 | static const int digits = __glibcpp_unsigned_int_digits; | |
1512 | static const int digits10 = __glibcpp_unsigned_int_digits10; | |
1513 | static const bool is_signed = false; | |
1514 | static const bool is_integer = true; | |
1515 | static const bool is_exact = true; | |
1516 | static const int radix = 2; | |
1517 | static unsigned int epsilon() throw() | |
1518 | { return 0; } | |
1519 | static unsigned int round_error() throw() | |
1520 | { return 0; } | |
1521 | ||
1522 | static const int min_exponent = 0; | |
1523 | static const int min_exponent10 = 0; | |
1524 | static const int max_exponent = 0; | |
1525 | static const int max_exponent10 = 0; | |
1526 | ||
1527 | static const bool has_infinity = false; | |
1528 | static const bool has_quiet_NaN = false; | |
1529 | static const bool has_signaling_NaN = false; | |
1530 | static const float_denorm_style has_denorm = denorm_absent; | |
1531 | static const bool has_denorm_loss = false; | |
1532 | ||
1533 | static unsigned int infinity() throw() | |
1534 | { return static_cast<unsigned int>(0); } | |
1535 | static unsigned int quiet_NaN() throw() | |
1536 | { return static_cast<unsigned int>(0); } | |
1537 | static unsigned int signaling_NaN() throw() | |
1538 | { return static_cast<unsigned int>(0); } | |
1539 | static unsigned int denorm_min() throw() | |
1540 | { return static_cast<unsigned int>(0); } | |
1541 | ||
1542 | static const bool is_iec559 = true; | |
1543 | static const bool is_bounded = true; | |
1544 | static const bool is_modulo = true; | |
1545 | ||
1546 | static const bool traps = __glibcpp_unsigned_int_traps; | |
1547 | static const bool tinyness_before = false; | |
1548 | static const float_round_style round_style = round_toward_zero; | |
1549 | }; | |
1550 | ||
1551 | #undef __glibcpp_unsigned_int_max | |
1552 | #undef __glibcpp_unsigned_int_digits | |
1553 | #undef __glibcpp_unsigned_int_digits10 | |
1554 | #undef __glibcpp_unsigned_int_traps | |
1555 | ||
1556 | template<> | |
1557 | struct numeric_limits<long> | |
1558 | { | |
1559 | static const bool is_specialized = true; | |
1560 | ||
1561 | static long min() throw() | |
1562 | { return __glibcpp_signed_long_min; } | |
1563 | static long max() throw() | |
1564 | { return __glibcpp_signed_long_max; } | |
1565 | ||
1566 | static const int digits = __glibcpp_signed_long_digits; | |
1567 | static const int digits10 = __glibcpp_signed_long_digits10; | |
1568 | static const bool is_signed = true; | |
1569 | static const bool is_integer = true; | |
1570 | static const bool is_exact = true; | |
1571 | static const int radix = 2; | |
1572 | static long epsilon() throw() | |
1573 | { return 0; } | |
1574 | static long round_error() throw() | |
1575 | { return 0; } | |
1576 | ||
1577 | static const int min_exponent = 0; | |
1578 | static const int min_exponent10 = 0; | |
1579 | static const int max_exponent = 0; | |
1580 | static const int max_exponent10 = 0; | |
1581 | ||
1582 | static const bool has_infinity = false; | |
1583 | static const bool has_quiet_NaN = false; | |
1584 | static const bool has_signaling_NaN = false; | |
1585 | static const float_denorm_style has_denorm = denorm_absent; | |
1586 | static const bool has_denorm_loss = false; | |
1587 | ||
1588 | static long infinity() throw() | |
1589 | { return static_cast<long>(0); } | |
1590 | static long quiet_NaN() throw() | |
1591 | { return static_cast<long>(0); } | |
1592 | static long signaling_NaN() throw() | |
1593 | { return static_cast<long>(0); } | |
1594 | static long denorm_min() throw() | |
1595 | { return static_cast<long>(0); } | |
1596 | ||
1597 | static const bool is_iec559 = true; | |
1598 | static const bool is_bounded = true; | |
1599 | static const bool is_modulo = __glibcpp_signed_long_is_modulo; | |
1600 | ||
1601 | static const bool traps = __glibcpp_signed_long_traps; | |
1602 | static const bool tinyness_before = false; | |
1603 | static const float_round_style round_style = round_toward_zero; | |
1604 | }; | |
1605 | ||
1606 | #undef __glibcpp_signed_long_min | |
1607 | #undef __glibcpp_signed_long_max | |
1608 | #undef __glibcpp_signed_long_digits | |
1609 | #undef __glibcpp_signed_long_digits10 | |
1610 | #undef __glibcpp_signed_long_is_modulo | |
1611 | #undef __glibcpp_signed_long_traps | |
1612 | ||
1613 | template<> | |
1614 | struct numeric_limits<unsigned long> | |
1615 | { | |
1616 | static const bool is_specialized = true; | |
1617 | ||
1618 | static unsigned long min() throw() | |
1619 | { return 0; } | |
1620 | static unsigned long max() throw() | |
1621 | { return __glibcpp_unsigned_long_max; } | |
1622 | ||
1623 | static const int digits = __glibcpp_unsigned_long_digits; | |
1624 | static const int digits10 = __glibcpp_unsigned_long_digits10; | |
1625 | static const bool is_signed = false; | |
1626 | static const bool is_integer = true; | |
1627 | static const bool is_exact = true; | |
1628 | static const int radix = 2; | |
1629 | static unsigned long epsilon() throw() | |
1630 | { return 0; } | |
1631 | static unsigned long round_error() throw() | |
1632 | { return 0; } | |
1633 | ||
1634 | static const int min_exponent = 0; | |
1635 | static const int min_exponent10 = 0; | |
1636 | static const int max_exponent = 0; | |
1637 | static const int max_exponent10 = 0; | |
1638 | ||
1639 | static const bool has_infinity = false; | |
1640 | static const bool has_quiet_NaN = false; | |
1641 | static const bool has_signaling_NaN = false; | |
1642 | static const float_denorm_style has_denorm = denorm_absent; | |
1643 | static const bool has_denorm_loss = false; | |
1644 | ||
1645 | static unsigned long infinity() throw() | |
1646 | { return static_cast<unsigned long>(0); } | |
1647 | static unsigned long quiet_NaN() throw() | |
1648 | { return static_cast<unsigned long>(0); } | |
1649 | static unsigned long signaling_NaN() throw() | |
1650 | { return static_cast<unsigned long>(0); } | |
1651 | static unsigned long denorm_min() throw() | |
1652 | { return static_cast<unsigned long>(0); } | |
1653 | ||
1654 | static const bool is_iec559 = true; | |
1655 | static const bool is_bounded = true; | |
1656 | static const bool is_modulo = true; | |
1657 | ||
1658 | static const bool traps = __glibcpp_unsigned_long_traps; | |
1659 | static const bool tinyness_before = false; | |
1660 | static const float_round_style round_style = round_toward_zero; | |
1661 | }; | |
1662 | ||
1663 | #undef __glibcpp_unsigned_long_max | |
1664 | #undef __glibcpp_unsigned_long_digits | |
1665 | #undef __glibcpp_unsigned_long_digits10 | |
1666 | #undef __glibcpp_unsigned_long_traps | |
1667 | ||
1668 | template<> | |
1669 | struct numeric_limits<long long> | |
1670 | { | |
1671 | static const bool is_specialized = true; | |
1672 | ||
1673 | static long long min() throw() | |
1674 | { return __glibcpp_signed_long_long_min; } | |
1675 | static long long max() throw() | |
1676 | { return __glibcpp_signed_long_long_max; } | |
1677 | ||
1678 | static const int digits = __glibcpp_signed_long_long_digits; | |
1679 | static const int digits10 = __glibcpp_signed_long_long_digits10; | |
1680 | static const bool is_signed = true; | |
1681 | static const bool is_integer = true; | |
1682 | static const bool is_exact = true; | |
1683 | static const int radix = 2; | |
1684 | static long long epsilon() throw() | |
1685 | { return 0; } | |
1686 | static long long round_error() throw() | |
1687 | { return 0; } | |
1688 | ||
1689 | static const int min_exponent = 0; | |
1690 | static const int min_exponent10 = 0; | |
1691 | static const int max_exponent = 0; | |
1692 | static const int max_exponent10 = 0; | |
1693 | ||
1694 | static const bool has_infinity = false; | |
1695 | static const bool has_quiet_NaN = false; | |
1696 | static const bool has_signaling_NaN = false; | |
1697 | static const float_denorm_style has_denorm = denorm_absent; | |
1698 | static const bool has_denorm_loss = false; | |
1699 | ||
1700 | static long long infinity() throw() | |
1701 | { return static_cast<long long>(0); } | |
1702 | static long long quiet_NaN() throw() | |
1703 | { return static_cast<long long>(0); } | |
1704 | static long long signaling_NaN() throw() | |
1705 | { return static_cast<long long>(0); } | |
1706 | static long long denorm_min() throw() | |
1707 | { return static_cast<long long>(0); } | |
1708 | ||
1709 | static const bool is_iec559 = true; | |
1710 | static const bool is_bounded = true; | |
1711 | static const bool is_modulo = __glibcpp_signed_long_long_is_modulo; | |
1712 | ||
1713 | static const bool traps = __glibcpp_signed_long_long_traps; | |
1714 | static const bool tinyness_before = false; | |
1715 | static const float_round_style round_style = round_toward_zero; | |
1716 | }; | |
1717 | ||
1718 | #undef __glibcpp_signed_long_long_min | |
1719 | #undef __glibcpp_signed_long_long_max | |
1720 | #undef __glibcpp_signed_long_long_digits | |
1721 | #undef __glibcpp_signed_long_long_digits10 | |
1722 | #undef __glibcpp_signed_long_long_is_modulo | |
1723 | #undef __glibcpp_signed_long_long_traps | |
1724 | ||
1725 | template<> | |
1726 | struct numeric_limits<unsigned long long> | |
1727 | { | |
1728 | static const bool is_specialized = true; | |
1729 | ||
1730 | static unsigned long long min() throw() | |
1731 | { return 0; } | |
1732 | static unsigned long long max() throw() | |
1733 | { return __glibcpp_unsigned_long_long_max; } | |
1734 | ||
1735 | static const int digits = __glibcpp_unsigned_long_long_digits; | |
1736 | static const int digits10 = __glibcpp_unsigned_long_long_digits10; | |
1737 | static const bool is_signed = false; | |
1738 | static const bool is_integer = true; | |
1739 | static const bool is_exact = true; | |
1740 | static const int radix = 2; | |
1741 | static unsigned long long epsilon() throw() | |
1742 | { return 0; } | |
1743 | static unsigned long long round_error() throw() | |
1744 | { return 0; } | |
1745 | ||
1746 | static const int min_exponent = 0; | |
1747 | static const int min_exponent10 = 0; | |
1748 | static const int max_exponent = 0; | |
1749 | static const int max_exponent10 = 0; | |
1750 | ||
1751 | static const bool has_infinity = false; | |
1752 | static const bool has_quiet_NaN = false; | |
1753 | static const bool has_signaling_NaN = false; | |
1754 | static const float_denorm_style has_denorm = denorm_absent; | |
1755 | static const bool has_denorm_loss = false; | |
1756 | ||
1757 | static unsigned long long infinity() throw() | |
1758 | { return static_cast<unsigned long long>(0); } | |
1759 | static unsigned long long quiet_NaN() throw() | |
1760 | { return static_cast<unsigned long long>(0); } | |
1761 | static unsigned long long signaling_NaN() throw() | |
1762 | { return static_cast<unsigned long long>(0); } | |
1763 | static unsigned long long denorm_min() throw() | |
1764 | { return static_cast<unsigned long long>(0); } | |
1765 | ||
1766 | static const bool is_iec559 = true; | |
1767 | static const bool is_bounded = true; | |
1768 | static const bool is_modulo = true; | |
1769 | ||
1770 | static const bool traps = true; | |
1771 | static const bool tinyness_before = false; | |
1772 | static const float_round_style round_style = round_toward_zero; | |
1773 | }; | |
1774 | ||
1775 | #undef __glibcpp_unsigned_long_long_max | |
1776 | #undef __glibcpp_unsigned_long_long_digits | |
1777 | #undef __glibcpp_unsigned_long_long_digits10 | |
1778 | #undef __glibcpp_unsigned_long_long_traps | |
1779 | ||
1780 | template<> | |
1781 | struct numeric_limits<float> | |
1782 | { | |
1783 | static const bool is_specialized = true; | |
1784 | ||
1785 | static float min() throw() | |
1786 | { return __glibcpp_float_min; } | |
1787 | static float max() throw() | |
1788 | { return __glibcpp_float_max; } | |
1789 | ||
1790 | static const int digits = __glibcpp_float_digits; | |
1791 | static const int digits10 = __glibcpp_float_digits10; | |
1792 | static const bool is_signed = true; | |
1793 | static const bool is_integer = false; | |
1794 | static const bool is_exact = false; | |
1795 | static const int radix = __glibcpp_float_radix; | |
1796 | static float epsilon() throw() | |
1797 | { return __glibcpp_float_epsilon; } | |
1798 | static float round_error() throw() | |
1799 | { return __glibcpp_float_round_error; } | |
1800 | ||
1801 | static const int min_exponent = __glibcpp_float_min_exponent; | |
1802 | static const int min_exponent10 = __glibcpp_float_min_exponent10; | |
1803 | static const int max_exponent = __glibcpp_float_max_exponent; | |
1804 | static const int max_exponent10 = __glibcpp_float_max_exponent10; | |
1805 | ||
1806 | static const bool has_infinity = __glibcpp_float_has_infinity; | |
1807 | static const bool has_quiet_NaN = __glibcpp_float_has_quiet_NaN; | |
1808 | static const bool has_signaling_NaN = __glibcpp_float_has_signaling_NaN; | |
1809 | static const float_denorm_style has_denorm = __glibcpp_float_has_denorm; | |
1810 | static const bool has_denorm_loss = __glibcpp_float_has_denorm_loss; | |
1811 | ||
1812 | static float infinity() throw() | |
1813 | { return __glibcpp_float_infinity; } | |
1814 | static float quiet_NaN() throw() | |
1815 | { return __glibcpp_float_quiet_NaN; } | |
1816 | static float signaling_NaN() throw() | |
1817 | { return __glibcpp_float_signaling_NaN; } | |
1818 | static float denorm_min() throw() | |
1819 | { return __glibcpp_float_denorm_min; } | |
1820 | ||
1821 | static const bool is_iec559 = __glibcpp_float_is_iec559; | |
1822 | static const bool is_bounded = __glibcpp_float_is_bounded; | |
1823 | static const bool is_modulo = __glibcpp_float_is_modulo; | |
1824 | ||
1825 | static const bool traps = __glibcpp_float_traps; | |
1826 | static const bool tinyness_before = __glibcpp_float_tinyness_before; | |
1827 | static const float_round_style round_style = __glibcpp_float_round_style; | |
1828 | }; | |
1829 | ||
1830 | #undef __glibcpp_float_min | |
1831 | #undef __glibcpp_float_max | |
1832 | #undef __glibcpp_float_digits | |
1833 | #undef __glibcpp_float_digits10 | |
1834 | #undef __glibcpp_float_radix | |
1835 | #undef __glibcpp_float_round_error | |
1836 | #undef __glibcpp_float_min_exponent | |
1837 | #undef __glibcpp_float_min_exponent10 | |
1838 | #undef __glibcpp_float_max_exponent | |
1839 | #undef __glibcpp_float_max_exponent10 | |
1840 | #undef __glibcpp_float_has_infinity | |
1841 | #undef __glibcpp_float_has_quiet_NaN | |
1842 | #undef __glibcpp_float_has_signaling_NaN | |
1843 | #undef __glibcpp_float_has_denorm | |
1844 | #undef __glibcpp_float_has_denorm_loss | |
1845 | #undef __glibcpp_float_infinity | |
1846 | #undef __glibcpp_float_quiet_NaN | |
1847 | #undef __glibcpp_float_signaling_NaN | |
1848 | #undef __glibcpp_float_denorm_min | |
1849 | #undef __glibcpp_float_is_iec559 | |
1850 | #undef __glibcpp_float_is_bounded | |
1851 | #undef __glibcpp_float_is_modulo | |
1852 | #undef __glibcpp_float_traps | |
1853 | #undef __glibcpp_float_tinyness_before | |
1854 | #undef __glibcpp_float_round_style | |
1855 | ||
1856 | template<> | |
1857 | struct numeric_limits<double> | |
1858 | { | |
1859 | static const bool is_specialized = true; | |
1860 | ||
1861 | static double min() throw() | |
1862 | { return __glibcpp_double_min; } | |
1863 | static double max() throw() | |
1864 | { return __glibcpp_double_max; } | |
1865 | ||
1866 | static const int digits = __glibcpp_double_digits; | |
1867 | static const int digits10 = __glibcpp_double_digits10; | |
1868 | static const bool is_signed = true; | |
1869 | static const bool is_integer = false; | |
1870 | static const bool is_exact = false; | |
1871 | static const int radix = __glibcpp_double_radix; | |
1872 | static double epsilon() throw() | |
1873 | { return __glibcpp_double_epsilon; } | |
1874 | static double round_error() throw() | |
1875 | { return __glibcpp_double_round_error; } | |
1876 | ||
1877 | static const int min_exponent = __glibcpp_double_min_exponent; | |
1878 | static const int min_exponent10 = __glibcpp_double_min_exponent10; | |
1879 | static const int max_exponent = __glibcpp_double_max_exponent; | |
1880 | static const int max_exponent10 = __glibcpp_double_max_exponent10; | |
1881 | ||
1882 | static const bool has_infinity = __glibcpp_double_has_infinity; | |
1883 | static const bool has_quiet_NaN = __glibcpp_double_has_quiet_NaN; | |
1884 | static const bool has_signaling_NaN = __glibcpp_double_has_signaling_NaN; | |
1885 | static const float_denorm_style has_denorm = | |
1886 | __glibcpp_double_has_denorm; | |
1887 | static const bool has_denorm_loss = __glibcpp_double_has_denorm_loss; | |
1888 | ||
1889 | static double infinity() throw() | |
1890 | { return __glibcpp_double_infinity; } | |
1891 | static double quiet_NaN() throw() | |
1892 | { return __glibcpp_double_quiet_NaN; } | |
1893 | static double signaling_NaN() throw() | |
1894 | { return __glibcpp_double_signaling_NaN; } | |
1895 | static double denorm_min() throw() | |
1896 | { return __glibcpp_double_denorm_min; } | |
1897 | ||
1898 | static const bool is_iec559 = __glibcpp_double_is_iec559; | |
1899 | static const bool is_bounded = __glibcpp_double_is_bounded; | |
1900 | static const bool is_modulo = __glibcpp_double_is_modulo; | |
1901 | ||
1902 | static const bool traps = __glibcpp_double_traps; | |
1903 | static const bool tinyness_before = __glibcpp_double_tinyness_before; | |
1904 | static const float_round_style round_style = | |
1905 | __glibcpp_double_round_style; | |
1906 | }; | |
1907 | ||
1908 | #undef __glibcpp_double_min | |
1909 | #undef __glibcpp_double_max | |
1910 | #undef __glibcpp_double_digits | |
1911 | #undef __glibcpp_double_digits10 | |
1912 | #undef __glibcpp_double_radix | |
1913 | #undef __glibcpp_double_round_error | |
1914 | #undef __glibcpp_double_min_exponent | |
1915 | #undef __glibcpp_double_min_exponent10 | |
1916 | #undef __glibcpp_double_max_exponent | |
1917 | #undef __glibcpp_double_max_exponent10 | |
1918 | #undef __glibcpp_double_has_infinity | |
1919 | #undef __glibcpp_double_has_quiet_NaN | |
1920 | #undef __glibcpp_double_has_signaling_NaN | |
1921 | #undef __glibcpp_double_has_denorm | |
1922 | #undef __glibcpp_double_has_denorm_loss | |
1923 | #undef __glibcpp_double_infinity | |
1924 | #undef __glibcpp_double_quiet_NaN | |
1925 | #undef __glibcpp_double_signaling_NaN | |
1926 | #undef __glibcpp_double_denorm_min | |
1927 | #undef __glibcpp_double_is_iec559 | |
1928 | #undef __glibcpp_double_is_bounded | |
1929 | #undef __glibcpp_double_is_modulo | |
1930 | #undef __glibcpp_double_traps | |
1931 | #undef __glibcpp_double_tinyness_before | |
1932 | #undef __glibcpp_double_round_style | |
1933 | ||
1934 | ||
1935 | template<> | |
1936 | struct numeric_limits<long double> | |
1937 | { | |
1938 | static const bool is_specialized = true; | |
1939 | ||
1940 | static long double min() throw() | |
1941 | { return __glibcpp_long_double_min; } | |
1942 | static long double max() throw() | |
1943 | { return __glibcpp_long_double_max; } | |
1944 | ||
1945 | static const int digits = __glibcpp_long_double_digits; | |
1946 | static const int digits10 = __glibcpp_long_double_digits10; | |
1947 | static const bool is_signed = true; | |
1948 | static const bool is_integer = false; | |
1949 | static const bool is_exact = false; | |
1950 | static const int radix = __glibcpp_long_double_radix; | |
1951 | static long double epsilon() throw() | |
1952 | { return __glibcpp_long_double_epsilon; } | |
1953 | static long double round_error() throw() | |
1954 | { return __glibcpp_long_double_round_error; } | |
1955 | ||
1956 | static const int min_exponent = __glibcpp_long_double_min_exponent; | |
1957 | static const int min_exponent10 = __glibcpp_long_double_min_exponent10; | |
1958 | static const int max_exponent = __glibcpp_long_double_max_exponent; | |
1959 | static const int max_exponent10 = __glibcpp_long_double_max_exponent10; | |
1960 | ||
1961 | static const bool has_infinity = __glibcpp_long_double_has_infinity; | |
1962 | static const bool has_quiet_NaN = __glibcpp_long_double_has_quiet_NaN; | |
1963 | static const bool has_signaling_NaN = | |
1964 | __glibcpp_long_double_has_signaling_NaN; | |
1965 | static const float_denorm_style has_denorm = | |
1966 | __glibcpp_long_double_has_denorm; | |
1967 | static const bool has_denorm_loss = | |
1968 | __glibcpp_long_double_has_denorm_loss; | |
1969 | ||
1970 | static long double infinity() throw() | |
1971 | { return __glibcpp_long_double_infinity; } | |
1972 | static long double quiet_NaN() throw() | |
1973 | { return __glibcpp_long_double_quiet_NaN; } | |
1974 | static long double signaling_NaN() throw() | |
1975 | { return __glibcpp_long_double_signaling_NaN; } | |
1976 | static long double denorm_min() throw() | |
1977 | { return __glibcpp_long_double_denorm_min; } | |
1978 | ||
1979 | static const bool is_iec559 = __glibcpp_long_double_is_iec559; | |
1980 | static const bool is_bounded = __glibcpp_long_double_is_bounded; | |
1981 | static const bool is_modulo = __glibcpp_long_double_is_modulo; | |
1982 | ||
1983 | static const bool traps = __glibcpp_long_double_traps; | |
1984 | static const bool tinyness_before = __glibcpp_long_double_tinyness_before; | |
1985 | static const float_round_style round_style = | |
1986 | __glibcpp_long_double_round_style; | |
1987 | }; | |
1988 | ||
1989 | #undef __glibcpp_long_double_min | |
1990 | #undef __glibcpp_long_double_max | |
1991 | #undef __glibcpp_long_double_digits | |
1992 | #undef __glibcpp_long_double_digits10 | |
1993 | #undef __glibcpp_long_double_radix | |
1994 | #undef __glibcpp_long_double_round_error | |
1995 | #undef __glibcpp_long_double_min_exponent | |
1996 | #undef __glibcpp_long_double_min_exponent10 | |
1997 | #undef __glibcpp_long_double_max_exponent | |
1998 | #undef __glibcpp_long_double_max_exponent10 | |
1999 | #undef __glibcpp_long_double_has_infinity | |
2000 | #undef __glibcpp_long_double_has_quiet_NaN | |
2001 | #undef __glibcpp_long_double_has_signaling_NaN | |
2002 | #undef __glibcpp_long_double_has_denorm | |
2003 | #undef __glibcpp_long_double_has_denorm_loss | |
2004 | #undef __glibcpp_long_double_infinity | |
2005 | #undef __glibcpp_long_double_quiet_NaN | |
2006 | #undef __glibcpp_long_double_signaling_NaN | |
2007 | #undef __glibcpp_long_double_denorm_min | |
2008 | #undef __glibcpp_long_double_is_iec559 | |
2009 | #undef __glibcpp_long_double_is_bounded | |
2010 | #undef __glibcpp_long_double_is_modulo | |
2011 | #undef __glibcpp_long_double_traps | |
2012 | #undef __glibcpp_long_double_tinyness_before | |
2013 | #undef __glibcpp_long_double_round_style | |
2014 | ||
2015 | } // namespace std | |
2016 | ||
2017 | #endif // _CPP_NUMERIC_LIMITS |