1 // The template and inlines for the numeric_limits classes. -*- C++ -*-
3 // Copyright (C) 1999-2015 Free Software Foundation, Inc.
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 3, or (at your option)
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.
16 // Under Section 7 of GPL version 3, you are granted additional
17 // permissions described in the GCC Runtime Library Exception, version
18 // 3.1, as published by the Free Software Foundation.
20 // You should have received a copy of the GNU General Public License and
21 // a copy of the GCC Runtime Library Exception along with this program;
22 // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see
23 // <http://www.gnu.org/licenses/>.
25 /** @file include/limits
26 * This is a Standard C++ Library header.
29 // Note: this is not a conforming implementation.
37 #ifndef _GLIBCXX_NUMERIC_LIMITS
38 #define _GLIBCXX_NUMERIC_LIMITS 1
40 #pragma GCC system_header
42 #include <bits/c++config.h>
45 // The numeric_limits<> traits document implementation-defined aspects
46 // of fundamental arithmetic data types (integers and floating points).
47 // From Standard C++ point of view, there are 14 such types:
50 // char, signed char, unsigned char, wchar_t (4)
51 // short, unsigned short (2)
53 // long, unsigned long (2)
60 // GNU C++ understands (where supported by the host C-library)
62 // long long, unsigned long long (2)
64 // which brings us to 16 fundamental arithmetic data types in GNU C++.
67 // Since a numeric_limits<> is a bit tricky to get right, we rely on
68 // an interface composed of macros which should be defined in config/os
69 // or config/cpu when they differ from the generic (read arbitrary)
70 // definitions given here.
73 // These values can be overridden in the target configuration file.
74 // The default values are appropriate for many 32-bit targets.
76 // GCC only intrinsically supports modulo integral types. The only remaining
77 // integral exceptional values is division by zero. Only targets that do not
78 // signal division by zero in some "hard to ignore" way should use false.
79 #ifndef __glibcxx_integral_traps
80 # define __glibcxx_integral_traps true
86 // Default values. Should be overridden in configuration files if necessary.
88 #ifndef __glibcxx_float_has_denorm_loss
89 # define __glibcxx_float_has_denorm_loss false
91 #ifndef __glibcxx_float_traps
92 # define __glibcxx_float_traps false
94 #ifndef __glibcxx_float_tinyness_before
95 # define __glibcxx_float_tinyness_before false
100 // Default values. Should be overridden in configuration files if necessary.
102 #ifndef __glibcxx_double_has_denorm_loss
103 # define __glibcxx_double_has_denorm_loss false
105 #ifndef __glibcxx_double_traps
106 # define __glibcxx_double_traps false
108 #ifndef __glibcxx_double_tinyness_before
109 # define __glibcxx_double_tinyness_before false
114 // Default values. Should be overridden in configuration files if necessary.
116 #ifndef __glibcxx_long_double_has_denorm_loss
117 # define __glibcxx_long_double_has_denorm_loss false
119 #ifndef __glibcxx_long_double_traps
120 # define __glibcxx_long_double_traps false
122 #ifndef __glibcxx_long_double_tinyness_before
123 # define __glibcxx_long_double_tinyness_before false
126 // You should not need to define any macros below this point.
128 #define __glibcxx_signed_b(T,B) ((T)(-1) < 0)
130 #define __glibcxx_min_b(T,B) \
131 (__glibcxx_signed_b (T,B) ? -__glibcxx_max_b (T,B) - 1 : (T)0)
133 #define __glibcxx_max_b(T,B) \
134 (__glibcxx_signed_b (T,B) ? \
135 (((((T)1 << (__glibcxx_digits_b (T,B) - 1)) - 1) << 1) + 1) : ~(T)0)
137 #define __glibcxx_digits_b(T,B) \
138 (B - __glibcxx_signed_b (T,B))
140 // The fraction 643/2136 approximates log10(2) to 7 significant digits.
141 #define __glibcxx_digits10_b(T,B) \
142 (__glibcxx_digits_b (T,B) * 643L / 2136)
144 #define __glibcxx_signed(T) \
145 __glibcxx_signed_b (T, sizeof(T) * __CHAR_BIT__)
146 #define __glibcxx_min(T) \
147 __glibcxx_min_b (T, sizeof(T) * __CHAR_BIT__)
148 #define __glibcxx_max(T) \
149 __glibcxx_max_b (T, sizeof(T) * __CHAR_BIT__)
150 #define __glibcxx_digits(T) \
151 __glibcxx_digits_b (T, sizeof(T) * __CHAR_BIT__)
152 #define __glibcxx_digits10(T) \
153 __glibcxx_digits10_b (T, sizeof(T) * __CHAR_BIT__)
155 #define __glibcxx_max_digits10(T) \
156 (2 + (T) * 643L / 2136)
158 namespace std _GLIBCXX_VISIBILITY(default)
160 _GLIBCXX_BEGIN_NAMESPACE_VERSION
163 * @brief Describes the rounding style for floating-point types.
165 * This is used in the std::numeric_limits class.
167 enum float_round_style
169 round_indeterminate = -1, /// Intermediate.
170 round_toward_zero = 0, /// To zero.
171 round_to_nearest = 1, /// To the nearest representable value.
172 round_toward_infinity = 2, /// To infinity.
173 round_toward_neg_infinity = 3 /// To negative infinity.
177 * @brief Describes the denormalization for floating-point types.
179 * These values represent the presence or absence of a variable number
180 * of exponent bits. This type is used in the std::numeric_limits class.
182 enum float_denorm_style
184 /// Indeterminate at compile time whether denormalized values are allowed.
185 denorm_indeterminate = -1,
186 /// The type does not allow denormalized values.
188 /// The type allows denormalized values.
193 * @brief Part of std::numeric_limits.
195 * The @c static @c const members are usable as integral constant
198 * @note This is a separate class for purposes of efficiency; you
199 * should only access these members as part of an instantiation
200 * of the std::numeric_limits class.
202 struct __numeric_limits_base
204 /** This will be true for all fundamental types (which have
205 specializations), and false for everything else. */
206 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = false;
208 /** The number of @c radix digits that be represented without change: for
209 integer types, the number of non-sign bits in the mantissa; for
210 floating types, the number of @c radix digits in the mantissa. */
211 static _GLIBCXX_USE_CONSTEXPR int digits = 0;
213 /** The number of base 10 digits that can be represented without change. */
214 static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
216 #if __cplusplus >= 201103L
217 /** The number of base 10 digits required to ensure that values which
218 differ are always differentiated. */
219 static constexpr int max_digits10 = 0;
222 /** True if the type is signed. */
223 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
225 /** True if the type is integer. */
226 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
228 /** True if the type uses an exact representation. All integer types are
229 exact, but not all exact types are integer. For example, rational and
230 fixed-exponent representations are exact but not integer. */
231 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
233 /** For integer types, specifies the base of the representation. For
234 floating types, specifies the base of the exponent representation. */
235 static _GLIBCXX_USE_CONSTEXPR int radix = 0;
237 /** The minimum negative integer such that @c radix raised to the power of
238 (one less than that integer) is a normalized floating point number. */
239 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
241 /** The minimum negative integer such that 10 raised to that power is in
242 the range of normalized floating point numbers. */
243 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
245 /** The maximum positive integer such that @c radix raised to the power of
246 (one less than that integer) is a representable finite floating point
248 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
250 /** The maximum positive integer such that 10 raised to that power is in
251 the range of representable finite floating point numbers. */
252 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
254 /** True if the type has a representation for positive infinity. */
255 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
257 /** True if the type has a representation for a quiet (non-signaling)
259 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
261 /** True if the type has a representation for a signaling
263 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
265 /** See std::float_denorm_style for more information. */
266 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent;
268 /** True if loss of accuracy is detected as a denormalization loss,
269 rather than as an inexact result. */
270 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
272 /** True if-and-only-if the type adheres to the IEC 559 standard, also
273 known as IEEE 754. (Only makes sense for floating point types.) */
274 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
276 /** True if the set of values representable by the type is
277 finite. All built-in types are bounded, this member would be
278 false for arbitrary precision types. */
279 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = false;
281 /** True if the type is @e modulo. A type is modulo if, for any
282 operation involving +, -, or * on values of that type whose
283 result would fall outside the range [min(),max()], the value
284 returned differs from the true value by an integer multiple of
285 max() - min() + 1. On most machines, this is false for floating
286 types, true for unsigned integers, and true for signed integers.
287 See PR22200 about signed integers. */
288 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
290 /** True if trapping is implemented for this type. */
291 static _GLIBCXX_USE_CONSTEXPR bool traps = false;
293 /** True if tininess is detected before rounding. (see IEC 559) */
294 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
296 /** See std::float_round_style for more information. This is only
297 meaningful for floating types; integer types will all be
298 round_toward_zero. */
299 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style =
304 * @brief Properties of fundamental types.
306 * This class allows a program to obtain information about the
307 * representation of a fundamental type on a given platform. For
308 * non-fundamental types, the functions will return 0 and the data
309 * members will all be @c false.
311 * _GLIBCXX_RESOLVE_LIB_DEFECTS: DRs 201 and 184 (hi Gaby!) are
312 * noted, but not incorporated in this documented (yet).
314 template<typename _Tp>
315 struct numeric_limits : public __numeric_limits_base
317 /** The minimum finite value, or for floating types with
318 denormalization, the minimum positive normalized value. */
319 static _GLIBCXX_CONSTEXPR _Tp
320 min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
322 /** The maximum finite value. */
323 static _GLIBCXX_CONSTEXPR _Tp
324 max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
326 #if __cplusplus >= 201103L
327 /** A finite value x such that there is no other finite value y
330 lowest() noexcept { return _Tp(); }
333 /** The @e machine @e epsilon: the difference between 1 and the least
334 value greater than 1 that is representable. */
335 static _GLIBCXX_CONSTEXPR _Tp
336 epsilon() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
338 /** The maximum rounding error measurement (see LIA-1). */
339 static _GLIBCXX_CONSTEXPR _Tp
340 round_error() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
342 /** The representation of positive infinity, if @c has_infinity. */
343 static _GLIBCXX_CONSTEXPR _Tp
344 infinity() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
346 /** The representation of a quiet Not a Number,
347 if @c has_quiet_NaN. */
348 static _GLIBCXX_CONSTEXPR _Tp
349 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
351 /** The representation of a signaling Not a Number, if
352 @c has_signaling_NaN. */
353 static _GLIBCXX_CONSTEXPR _Tp
354 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
356 /** The minimum positive denormalized value. For types where
357 @c has_denorm is false, this is the minimum positive normalized
359 static _GLIBCXX_CONSTEXPR _Tp
360 denorm_min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
363 #if __cplusplus >= 201103L
364 template<typename _Tp>
365 struct numeric_limits<const _Tp>
366 : public numeric_limits<_Tp> { };
368 template<typename _Tp>
369 struct numeric_limits<volatile _Tp>
370 : public numeric_limits<_Tp> { };
372 template<typename _Tp>
373 struct numeric_limits<const volatile _Tp>
374 : public numeric_limits<_Tp> { };
377 // Now there follow 16 explicit specializations. Yes, 16. Make sure
378 // you get the count right. (18 in c++0x mode)
380 /// numeric_limits<bool> specialization.
382 struct numeric_limits<bool>
384 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
386 static _GLIBCXX_CONSTEXPR bool
387 min() _GLIBCXX_USE_NOEXCEPT { return false; }
389 static _GLIBCXX_CONSTEXPR bool
390 max() _GLIBCXX_USE_NOEXCEPT { return true; }
392 #if __cplusplus >= 201103L
393 static constexpr bool
394 lowest() noexcept { return min(); }
396 static _GLIBCXX_USE_CONSTEXPR int digits = 1;
397 static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
398 #if __cplusplus >= 201103L
399 static constexpr int max_digits10 = 0;
401 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
402 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
403 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
404 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
406 static _GLIBCXX_CONSTEXPR bool
407 epsilon() _GLIBCXX_USE_NOEXCEPT { return false; }
409 static _GLIBCXX_CONSTEXPR bool
410 round_error() _GLIBCXX_USE_NOEXCEPT { return false; }
412 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
413 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
414 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
415 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
417 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
418 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
419 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
420 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
422 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
424 static _GLIBCXX_CONSTEXPR bool
425 infinity() _GLIBCXX_USE_NOEXCEPT { return false; }
427 static _GLIBCXX_CONSTEXPR bool
428 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return false; }
430 static _GLIBCXX_CONSTEXPR bool
431 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return false; }
433 static _GLIBCXX_CONSTEXPR bool
434 denorm_min() _GLIBCXX_USE_NOEXCEPT { return false; }
436 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
437 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
438 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
440 // It is not clear what it means for a boolean type to trap.
441 // This is a DR on the LWG issue list. Here, I use integer
442 // promotion semantics.
443 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
444 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
445 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
449 /// numeric_limits<char> specialization.
451 struct numeric_limits<char>
453 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
455 static _GLIBCXX_CONSTEXPR char
456 min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); }
458 static _GLIBCXX_CONSTEXPR char
459 max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); }
461 #if __cplusplus >= 201103L
462 static constexpr char
463 lowest() noexcept { return min(); }
466 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char);
467 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char);
468 #if __cplusplus >= 201103L
469 static constexpr int max_digits10 = 0;
471 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char);
472 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
473 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
474 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
476 static _GLIBCXX_CONSTEXPR char
477 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
479 static _GLIBCXX_CONSTEXPR char
480 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
482 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
483 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
484 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
485 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
487 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
488 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
489 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
490 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
492 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
494 static _GLIBCXX_CONSTEXPR
495 char infinity() _GLIBCXX_USE_NOEXCEPT { return char(); }
497 static _GLIBCXX_CONSTEXPR char
498 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); }
500 static _GLIBCXX_CONSTEXPR char
501 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); }
503 static _GLIBCXX_CONSTEXPR char
504 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<char>(0); }
506 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
507 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
508 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed;
510 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
511 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
512 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
516 /// numeric_limits<signed char> specialization.
518 struct numeric_limits<signed char>
520 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
522 static _GLIBCXX_CONSTEXPR signed char
523 min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; }
525 static _GLIBCXX_CONSTEXPR signed char
526 max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; }
528 #if __cplusplus >= 201103L
529 static constexpr signed char
530 lowest() noexcept { return min(); }
533 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (signed char);
534 static _GLIBCXX_USE_CONSTEXPR int digits10
535 = __glibcxx_digits10 (signed char);
536 #if __cplusplus >= 201103L
537 static constexpr int max_digits10 = 0;
539 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
540 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
541 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
542 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
544 static _GLIBCXX_CONSTEXPR signed char
545 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
547 static _GLIBCXX_CONSTEXPR signed char
548 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
550 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
551 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
552 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
553 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
555 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
556 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
557 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
558 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
560 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
562 static _GLIBCXX_CONSTEXPR signed char
563 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); }
565 static _GLIBCXX_CONSTEXPR signed char
566 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); }
568 static _GLIBCXX_CONSTEXPR signed char
569 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
570 { return static_cast<signed char>(0); }
572 static _GLIBCXX_CONSTEXPR signed char
573 denorm_min() _GLIBCXX_USE_NOEXCEPT
574 { return static_cast<signed char>(0); }
576 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
577 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
578 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
580 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
581 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
582 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
586 /// numeric_limits<unsigned char> specialization.
588 struct numeric_limits<unsigned char>
590 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
592 static _GLIBCXX_CONSTEXPR unsigned char
593 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
595 static _GLIBCXX_CONSTEXPR unsigned char
596 max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; }
598 #if __cplusplus >= 201103L
599 static constexpr unsigned char
600 lowest() noexcept { return min(); }
603 static _GLIBCXX_USE_CONSTEXPR int digits
604 = __glibcxx_digits (unsigned char);
605 static _GLIBCXX_USE_CONSTEXPR int digits10
606 = __glibcxx_digits10 (unsigned char);
607 #if __cplusplus >= 201103L
608 static constexpr int max_digits10 = 0;
610 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
611 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
612 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
613 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
615 static _GLIBCXX_CONSTEXPR unsigned char
616 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
618 static _GLIBCXX_CONSTEXPR unsigned char
619 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
621 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
622 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
623 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
624 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
626 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
627 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
628 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
629 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
631 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
633 static _GLIBCXX_CONSTEXPR unsigned char
634 infinity() _GLIBCXX_USE_NOEXCEPT
635 { return static_cast<unsigned char>(0); }
637 static _GLIBCXX_CONSTEXPR unsigned char
638 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
639 { return static_cast<unsigned char>(0); }
641 static _GLIBCXX_CONSTEXPR unsigned char
642 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
643 { return static_cast<unsigned char>(0); }
645 static _GLIBCXX_CONSTEXPR unsigned char
646 denorm_min() _GLIBCXX_USE_NOEXCEPT
647 { return static_cast<unsigned char>(0); }
649 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
650 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
651 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
653 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
654 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
655 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
659 /// numeric_limits<wchar_t> specialization.
661 struct numeric_limits<wchar_t>
663 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
665 static _GLIBCXX_CONSTEXPR wchar_t
666 min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); }
668 static _GLIBCXX_CONSTEXPR wchar_t
669 max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); }
671 #if __cplusplus >= 201103L
672 static constexpr wchar_t
673 lowest() noexcept { return min(); }
676 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (wchar_t);
677 static _GLIBCXX_USE_CONSTEXPR int digits10
678 = __glibcxx_digits10 (wchar_t);
679 #if __cplusplus >= 201103L
680 static constexpr int max_digits10 = 0;
682 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (wchar_t);
683 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
684 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
685 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
687 static _GLIBCXX_CONSTEXPR wchar_t
688 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
690 static _GLIBCXX_CONSTEXPR wchar_t
691 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
693 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
694 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
695 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
696 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
698 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
699 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
700 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
701 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
703 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
705 static _GLIBCXX_CONSTEXPR wchar_t
706 infinity() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
708 static _GLIBCXX_CONSTEXPR wchar_t
709 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
711 static _GLIBCXX_CONSTEXPR wchar_t
712 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
714 static _GLIBCXX_CONSTEXPR wchar_t
715 denorm_min() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
717 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
718 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
719 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed;
721 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
722 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
723 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
727 #if __cplusplus >= 201103L
728 /// numeric_limits<char16_t> specialization.
730 struct numeric_limits<char16_t>
732 static constexpr bool is_specialized = true;
734 static constexpr char16_t
735 min() noexcept { return __glibcxx_min (char16_t); }
737 static constexpr char16_t
738 max() noexcept { return __glibcxx_max (char16_t); }
740 static constexpr char16_t
741 lowest() noexcept { return min(); }
743 static constexpr int digits = __glibcxx_digits (char16_t);
744 static constexpr int digits10 = __glibcxx_digits10 (char16_t);
745 static constexpr int max_digits10 = 0;
746 static constexpr bool is_signed = __glibcxx_signed (char16_t);
747 static constexpr bool is_integer = true;
748 static constexpr bool is_exact = true;
749 static constexpr int radix = 2;
751 static constexpr char16_t
752 epsilon() noexcept { return 0; }
754 static constexpr char16_t
755 round_error() noexcept { return 0; }
757 static constexpr int min_exponent = 0;
758 static constexpr int min_exponent10 = 0;
759 static constexpr int max_exponent = 0;
760 static constexpr int max_exponent10 = 0;
762 static constexpr bool has_infinity = false;
763 static constexpr bool has_quiet_NaN = false;
764 static constexpr bool has_signaling_NaN = false;
765 static constexpr float_denorm_style has_denorm = denorm_absent;
766 static constexpr bool has_denorm_loss = false;
768 static constexpr char16_t
769 infinity() noexcept { return char16_t(); }
771 static constexpr char16_t
772 quiet_NaN() noexcept { return char16_t(); }
774 static constexpr char16_t
775 signaling_NaN() noexcept { return char16_t(); }
777 static constexpr char16_t
778 denorm_min() noexcept { return char16_t(); }
780 static constexpr bool is_iec559 = false;
781 static constexpr bool is_bounded = true;
782 static constexpr bool is_modulo = !is_signed;
784 static constexpr bool traps = __glibcxx_integral_traps;
785 static constexpr bool tinyness_before = false;
786 static constexpr float_round_style round_style = round_toward_zero;
789 /// numeric_limits<char32_t> specialization.
791 struct numeric_limits<char32_t>
793 static constexpr bool is_specialized = true;
795 static constexpr char32_t
796 min() noexcept { return __glibcxx_min (char32_t); }
798 static constexpr char32_t
799 max() noexcept { return __glibcxx_max (char32_t); }
801 static constexpr char32_t
802 lowest() noexcept { return min(); }
804 static constexpr int digits = __glibcxx_digits (char32_t);
805 static constexpr int digits10 = __glibcxx_digits10 (char32_t);
806 static constexpr int max_digits10 = 0;
807 static constexpr bool is_signed = __glibcxx_signed (char32_t);
808 static constexpr bool is_integer = true;
809 static constexpr bool is_exact = true;
810 static constexpr int radix = 2;
812 static constexpr char32_t
813 epsilon() noexcept { return 0; }
815 static constexpr char32_t
816 round_error() noexcept { return 0; }
818 static constexpr int min_exponent = 0;
819 static constexpr int min_exponent10 = 0;
820 static constexpr int max_exponent = 0;
821 static constexpr int max_exponent10 = 0;
823 static constexpr bool has_infinity = false;
824 static constexpr bool has_quiet_NaN = false;
825 static constexpr bool has_signaling_NaN = false;
826 static constexpr float_denorm_style has_denorm = denorm_absent;
827 static constexpr bool has_denorm_loss = false;
829 static constexpr char32_t
830 infinity() noexcept { return char32_t(); }
832 static constexpr char32_t
833 quiet_NaN() noexcept { return char32_t(); }
835 static constexpr char32_t
836 signaling_NaN() noexcept { return char32_t(); }
838 static constexpr char32_t
839 denorm_min() noexcept { return char32_t(); }
841 static constexpr bool is_iec559 = false;
842 static constexpr bool is_bounded = true;
843 static constexpr bool is_modulo = !is_signed;
845 static constexpr bool traps = __glibcxx_integral_traps;
846 static constexpr bool tinyness_before = false;
847 static constexpr float_round_style round_style = round_toward_zero;
851 /// numeric_limits<short> specialization.
853 struct numeric_limits<short>
855 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
857 static _GLIBCXX_CONSTEXPR short
858 min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; }
860 static _GLIBCXX_CONSTEXPR short
861 max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; }
863 #if __cplusplus >= 201103L
864 static constexpr short
865 lowest() noexcept { return min(); }
868 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (short);
869 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (short);
870 #if __cplusplus >= 201103L
871 static constexpr int max_digits10 = 0;
873 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
874 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
875 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
876 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
878 static _GLIBCXX_CONSTEXPR short
879 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
881 static _GLIBCXX_CONSTEXPR short
882 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
884 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
885 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
886 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
887 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
889 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
890 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
891 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
892 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
894 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
896 static _GLIBCXX_CONSTEXPR short
897 infinity() _GLIBCXX_USE_NOEXCEPT { return short(); }
899 static _GLIBCXX_CONSTEXPR short
900 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); }
902 static _GLIBCXX_CONSTEXPR short
903 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); }
905 static _GLIBCXX_CONSTEXPR short
906 denorm_min() _GLIBCXX_USE_NOEXCEPT { return short(); }
908 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
909 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
910 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
912 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
913 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
914 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
918 /// numeric_limits<unsigned short> specialization.
920 struct numeric_limits<unsigned short>
922 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
924 static _GLIBCXX_CONSTEXPR unsigned short
925 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
927 static _GLIBCXX_CONSTEXPR unsigned short
928 max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; }
930 #if __cplusplus >= 201103L
931 static constexpr unsigned short
932 lowest() noexcept { return min(); }
935 static _GLIBCXX_USE_CONSTEXPR int digits
936 = __glibcxx_digits (unsigned short);
937 static _GLIBCXX_USE_CONSTEXPR int digits10
938 = __glibcxx_digits10 (unsigned short);
939 #if __cplusplus >= 201103L
940 static constexpr int max_digits10 = 0;
942 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
943 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
944 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
945 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
947 static _GLIBCXX_CONSTEXPR unsigned short
948 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
950 static _GLIBCXX_CONSTEXPR unsigned short
951 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
953 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
954 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
955 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
956 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
958 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
959 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
960 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
961 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
963 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
965 static _GLIBCXX_CONSTEXPR unsigned short
966 infinity() _GLIBCXX_USE_NOEXCEPT
967 { return static_cast<unsigned short>(0); }
969 static _GLIBCXX_CONSTEXPR unsigned short
970 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
971 { return static_cast<unsigned short>(0); }
973 static _GLIBCXX_CONSTEXPR unsigned short
974 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
975 { return static_cast<unsigned short>(0); }
977 static _GLIBCXX_CONSTEXPR unsigned short
978 denorm_min() _GLIBCXX_USE_NOEXCEPT
979 { return static_cast<unsigned short>(0); }
981 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
982 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
983 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
985 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
986 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
987 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
991 /// numeric_limits<int> specialization.
993 struct numeric_limits<int>
995 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
997 static _GLIBCXX_CONSTEXPR int
998 min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; }
1000 static _GLIBCXX_CONSTEXPR int
1001 max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; }
1003 #if __cplusplus >= 201103L
1004 static constexpr int
1005 lowest() noexcept { return min(); }
1008 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (int);
1009 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (int);
1010 #if __cplusplus >= 201103L
1011 static constexpr int max_digits10 = 0;
1013 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1014 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1015 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1016 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1018 static _GLIBCXX_CONSTEXPR int
1019 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1021 static _GLIBCXX_CONSTEXPR int
1022 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1024 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1025 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1026 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1027 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1029 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1030 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1031 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1032 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1034 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1036 static _GLIBCXX_CONSTEXPR int
1037 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1039 static _GLIBCXX_CONSTEXPR int
1040 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1042 static _GLIBCXX_CONSTEXPR int
1043 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1045 static _GLIBCXX_CONSTEXPR int
1046 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1048 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1049 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1050 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1052 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1053 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1054 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1055 = round_toward_zero;
1058 /// numeric_limits<unsigned int> specialization.
1060 struct numeric_limits<unsigned int>
1062 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1064 static _GLIBCXX_CONSTEXPR unsigned int
1065 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
1067 static _GLIBCXX_CONSTEXPR unsigned int
1068 max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; }
1070 #if __cplusplus >= 201103L
1071 static constexpr unsigned int
1072 lowest() noexcept { return min(); }
1075 static _GLIBCXX_USE_CONSTEXPR int digits
1076 = __glibcxx_digits (unsigned int);
1077 static _GLIBCXX_USE_CONSTEXPR int digits10
1078 = __glibcxx_digits10 (unsigned int);
1079 #if __cplusplus >= 201103L
1080 static constexpr int max_digits10 = 0;
1082 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
1083 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1084 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1085 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1087 static _GLIBCXX_CONSTEXPR unsigned int
1088 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1090 static _GLIBCXX_CONSTEXPR unsigned int
1091 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1093 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1094 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1095 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1096 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1098 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1099 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1100 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1101 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1103 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1105 static _GLIBCXX_CONSTEXPR unsigned int
1106 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned int>(0); }
1108 static _GLIBCXX_CONSTEXPR unsigned int
1109 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
1110 { return static_cast<unsigned int>(0); }
1112 static _GLIBCXX_CONSTEXPR unsigned int
1113 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1114 { return static_cast<unsigned int>(0); }
1116 static _GLIBCXX_CONSTEXPR unsigned int
1117 denorm_min() _GLIBCXX_USE_NOEXCEPT
1118 { return static_cast<unsigned int>(0); }
1120 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1121 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1122 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
1124 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1125 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1126 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1127 = round_toward_zero;
1130 /// numeric_limits<long> specialization.
1132 struct numeric_limits<long>
1134 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1136 static _GLIBCXX_CONSTEXPR long
1137 min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; }
1139 static _GLIBCXX_CONSTEXPR long
1140 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; }
1142 #if __cplusplus >= 201103L
1143 static constexpr long
1144 lowest() noexcept { return min(); }
1147 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long);
1148 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (long);
1149 #if __cplusplus >= 201103L
1150 static constexpr int max_digits10 = 0;
1152 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1153 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1154 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1155 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1157 static _GLIBCXX_CONSTEXPR long
1158 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1160 static _GLIBCXX_CONSTEXPR long
1161 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1163 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1164 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1165 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1166 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1168 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1169 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1170 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1171 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1173 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1175 static _GLIBCXX_CONSTEXPR long
1176 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1178 static _GLIBCXX_CONSTEXPR long
1179 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1181 static _GLIBCXX_CONSTEXPR long
1182 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1184 static _GLIBCXX_CONSTEXPR long
1185 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1187 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1188 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1189 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1191 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1192 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1193 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1194 = round_toward_zero;
1197 /// numeric_limits<unsigned long> specialization.
1199 struct numeric_limits<unsigned long>
1201 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1203 static _GLIBCXX_CONSTEXPR unsigned long
1204 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
1206 static _GLIBCXX_CONSTEXPR unsigned long
1207 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; }
1209 #if __cplusplus >= 201103L
1210 static constexpr unsigned long
1211 lowest() noexcept { return min(); }
1214 static _GLIBCXX_USE_CONSTEXPR int digits
1215 = __glibcxx_digits (unsigned long);
1216 static _GLIBCXX_USE_CONSTEXPR int digits10
1217 = __glibcxx_digits10 (unsigned long);
1218 #if __cplusplus >= 201103L
1219 static constexpr int max_digits10 = 0;
1221 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
1222 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1223 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1224 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1226 static _GLIBCXX_CONSTEXPR unsigned long
1227 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1229 static _GLIBCXX_CONSTEXPR unsigned long
1230 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1232 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1233 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1234 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1235 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1237 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1238 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1239 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1240 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1242 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1244 static _GLIBCXX_CONSTEXPR unsigned long
1245 infinity() _GLIBCXX_USE_NOEXCEPT
1246 { return static_cast<unsigned long>(0); }
1248 static _GLIBCXX_CONSTEXPR unsigned long
1249 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
1250 { return static_cast<unsigned long>(0); }
1252 static _GLIBCXX_CONSTEXPR unsigned long
1253 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1254 { return static_cast<unsigned long>(0); }
1256 static _GLIBCXX_CONSTEXPR unsigned long
1257 denorm_min() _GLIBCXX_USE_NOEXCEPT
1258 { return static_cast<unsigned long>(0); }
1260 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1261 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1262 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
1264 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1265 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1266 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1267 = round_toward_zero;
1270 /// numeric_limits<long long> specialization.
1272 struct numeric_limits<long long>
1274 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1276 static _GLIBCXX_CONSTEXPR long long
1277 min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; }
1279 static _GLIBCXX_CONSTEXPR long long
1280 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; }
1282 #if __cplusplus >= 201103L
1283 static constexpr long long
1284 lowest() noexcept { return min(); }
1287 static _GLIBCXX_USE_CONSTEXPR int digits
1288 = __glibcxx_digits (long long);
1289 static _GLIBCXX_USE_CONSTEXPR int digits10
1290 = __glibcxx_digits10 (long long);
1291 #if __cplusplus >= 201103L
1292 static constexpr int max_digits10 = 0;
1294 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1295 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1296 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1297 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1299 static _GLIBCXX_CONSTEXPR long long
1300 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1302 static _GLIBCXX_CONSTEXPR long long
1303 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1305 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1306 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1307 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1308 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1310 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1311 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1312 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1313 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1315 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1317 static _GLIBCXX_CONSTEXPR long long
1318 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
1320 static _GLIBCXX_CONSTEXPR long long
1321 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
1323 static _GLIBCXX_CONSTEXPR long long
1324 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1325 { return static_cast<long long>(0); }
1327 static _GLIBCXX_CONSTEXPR long long
1328 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
1330 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1331 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1332 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1334 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1335 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1336 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1337 = round_toward_zero;
1340 /// numeric_limits<unsigned long long> specialization.
1342 struct numeric_limits<unsigned long long>
1344 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1346 static _GLIBCXX_CONSTEXPR unsigned long long
1347 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
1349 static _GLIBCXX_CONSTEXPR unsigned long long
1350 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; }
1352 #if __cplusplus >= 201103L
1353 static constexpr unsigned long long
1354 lowest() noexcept { return min(); }
1357 static _GLIBCXX_USE_CONSTEXPR int digits
1358 = __glibcxx_digits (unsigned long long);
1359 static _GLIBCXX_USE_CONSTEXPR int digits10
1360 = __glibcxx_digits10 (unsigned long long);
1361 #if __cplusplus >= 201103L
1362 static constexpr int max_digits10 = 0;
1364 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
1365 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1366 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1367 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1369 static _GLIBCXX_CONSTEXPR unsigned long long
1370 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1372 static _GLIBCXX_CONSTEXPR unsigned long long
1373 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1375 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1376 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1377 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1378 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1380 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1381 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1382 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1383 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1385 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1387 static _GLIBCXX_CONSTEXPR unsigned long long
1388 infinity() _GLIBCXX_USE_NOEXCEPT
1389 { return static_cast<unsigned long long>(0); }
1391 static _GLIBCXX_CONSTEXPR unsigned long long
1392 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
1393 { return static_cast<unsigned long long>(0); }
1395 static _GLIBCXX_CONSTEXPR unsigned long long
1396 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1397 { return static_cast<unsigned long long>(0); }
1399 static _GLIBCXX_CONSTEXPR unsigned long long
1400 denorm_min() _GLIBCXX_USE_NOEXCEPT
1401 { return static_cast<unsigned long long>(0); }
1403 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1404 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1405 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
1407 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1408 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1409 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1410 = round_toward_zero;
1413 #if !defined(__STRICT_ANSI__)
1415 #define __INT_N(TYPE, BITSIZE, EXT, UEXT) \
1417 struct numeric_limits<TYPE> \
1419 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \
1421 static _GLIBCXX_CONSTEXPR TYPE \
1422 min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min_b (TYPE, BITSIZE); } \
1424 static _GLIBCXX_CONSTEXPR TYPE \
1425 max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max_b (TYPE, BITSIZE); } \
1427 static _GLIBCXX_USE_CONSTEXPR int digits \
1429 static _GLIBCXX_USE_CONSTEXPR int digits10 \
1430 = (BITSIZE - 1) * 643L / 2136; \
1432 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; \
1433 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \
1434 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \
1435 static _GLIBCXX_USE_CONSTEXPR int radix = 2; \
1437 static _GLIBCXX_CONSTEXPR TYPE \
1438 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1440 static _GLIBCXX_CONSTEXPR TYPE \
1441 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1445 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; \
1446 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; \
1447 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; \
1448 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; \
1450 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; \
1451 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; \
1452 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; \
1453 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm \
1455 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; \
1457 static _GLIBCXX_CONSTEXPR TYPE \
1458 infinity() _GLIBCXX_USE_NOEXCEPT \
1459 { return static_cast<TYPE>(0); } \
1461 static _GLIBCXX_CONSTEXPR TYPE \
1462 quiet_NaN() _GLIBCXX_USE_NOEXCEPT \
1463 { return static_cast<TYPE>(0); } \
1465 static _GLIBCXX_CONSTEXPR TYPE \
1466 signaling_NaN() _GLIBCXX_USE_NOEXCEPT \
1467 { return static_cast<TYPE>(0); } \
1469 static _GLIBCXX_CONSTEXPR TYPE \
1470 denorm_min() _GLIBCXX_USE_NOEXCEPT \
1471 { return static_cast<TYPE>(0); } \
1473 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; \
1474 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; \
1475 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; \
1477 static _GLIBCXX_USE_CONSTEXPR bool traps \
1478 = __glibcxx_integral_traps; \
1479 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; \
1480 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style \
1481 = round_toward_zero; \
1485 struct numeric_limits<unsigned TYPE> \
1487 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \
1489 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1490 min() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1492 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1493 max() _GLIBCXX_USE_NOEXCEPT \
1494 { return __glibcxx_max_b (unsigned TYPE, BITSIZE); } \
1498 static _GLIBCXX_USE_CONSTEXPR int digits \
1500 static _GLIBCXX_USE_CONSTEXPR int digits10 \
1501 = BITSIZE * 643L / 2136; \
1502 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; \
1503 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \
1504 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \
1505 static _GLIBCXX_USE_CONSTEXPR int radix = 2; \
1507 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1508 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1510 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1511 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1513 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; \
1514 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; \
1515 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; \
1516 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; \
1518 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; \
1519 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; \
1520 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; \
1521 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm \
1523 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; \
1525 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1526 infinity() _GLIBCXX_USE_NOEXCEPT \
1527 { return static_cast<unsigned TYPE>(0); } \
1529 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1530 quiet_NaN() _GLIBCXX_USE_NOEXCEPT \
1531 { return static_cast<unsigned TYPE>(0); } \
1533 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1534 signaling_NaN() _GLIBCXX_USE_NOEXCEPT \
1535 { return static_cast<unsigned TYPE>(0); } \
1537 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1538 denorm_min() _GLIBCXX_USE_NOEXCEPT \
1539 { return static_cast<unsigned TYPE>(0); } \
1541 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; \
1542 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; \
1543 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; \
1545 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; \
1546 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; \
1547 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style \
1548 = round_toward_zero; \
1551 #if __cplusplus >= 201103L
1553 #define __INT_N_201103(TYPE) \
1554 static constexpr TYPE \
1555 lowest() noexcept { return min(); } \
1556 static constexpr int max_digits10 = 0;
1558 #define __INT_N_U201103(TYPE) \
1559 static constexpr unsigned TYPE \
1560 lowest() noexcept { return min(); } \
1561 static constexpr int max_digits10 = 0;
1564 #define __INT_N_201103(TYPE)
1565 #define __INT_N_U201103(TYPE)
1568 #ifdef __GLIBCXX_TYPE_INT_N_0
1569 __INT_N(__GLIBCXX_TYPE_INT_N_0, __GLIBCXX_BITSIZE_INT_N_0,
1570 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_0), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_0))
1572 #ifdef __GLIBCXX_TYPE_INT_N_1
1573 __INT_N (__GLIBCXX_TYPE_INT_N_1, __GLIBCXX_BITSIZE_INT_N_1,
1574 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_1), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_1))
1576 #ifdef __GLIBCXX_TYPE_INT_N_2
1577 __INT_N (__GLIBCXX_TYPE_INT_N_2, __GLIBCXX_BITSIZE_INT_N_2,
1578 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_2), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_2))
1580 #ifdef __GLIBCXX_TYPE_INT_N_3
1581 __INT_N (__GLIBCXX_TYPE_INT_N_3, __GLIBCXX_BITSIZE_INT_N_3,
1582 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_3), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_3))
1586 #undef __INT_N_201103
1587 #undef __INT_N_U201103
1591 /// numeric_limits<float> specialization.
1593 struct numeric_limits<float>
1595 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1597 static _GLIBCXX_CONSTEXPR float
1598 min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
1600 static _GLIBCXX_CONSTEXPR float
1601 max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; }
1603 #if __cplusplus >= 201103L
1604 static constexpr float
1605 lowest() noexcept { return -__FLT_MAX__; }
1608 static _GLIBCXX_USE_CONSTEXPR int digits = __FLT_MANT_DIG__;
1609 static _GLIBCXX_USE_CONSTEXPR int digits10 = __FLT_DIG__;
1610 #if __cplusplus >= 201103L
1611 static constexpr int max_digits10
1612 = __glibcxx_max_digits10 (__FLT_MANT_DIG__);
1614 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1615 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
1616 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
1617 static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
1619 static _GLIBCXX_CONSTEXPR float
1620 epsilon() _GLIBCXX_USE_NOEXCEPT { return __FLT_EPSILON__; }
1622 static _GLIBCXX_CONSTEXPR float
1623 round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5F; }
1625 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __FLT_MIN_EXP__;
1626 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __FLT_MIN_10_EXP__;
1627 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __FLT_MAX_EXP__;
1628 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __FLT_MAX_10_EXP__;
1630 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __FLT_HAS_INFINITY__;
1631 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __FLT_HAS_QUIET_NAN__;
1632 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
1633 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1634 = bool(__FLT_HAS_DENORM__) ? denorm_present : denorm_absent;
1635 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
1636 = __glibcxx_float_has_denorm_loss;
1638 static _GLIBCXX_CONSTEXPR float
1639 infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_valf(); }
1641 static _GLIBCXX_CONSTEXPR float
1642 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanf(""); }
1644 static _GLIBCXX_CONSTEXPR float
1645 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansf(""); }
1647 static _GLIBCXX_CONSTEXPR float
1648 denorm_min() _GLIBCXX_USE_NOEXCEPT { return __FLT_DENORM_MIN__; }
1650 static _GLIBCXX_USE_CONSTEXPR bool is_iec559
1651 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
1652 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1653 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1655 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_float_traps;
1656 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before
1657 = __glibcxx_float_tinyness_before;
1658 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1662 #undef __glibcxx_float_has_denorm_loss
1663 #undef __glibcxx_float_traps
1664 #undef __glibcxx_float_tinyness_before
1666 /// numeric_limits<double> specialization.
1668 struct numeric_limits<double>
1670 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1672 static _GLIBCXX_CONSTEXPR double
1673 min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; }
1675 static _GLIBCXX_CONSTEXPR double
1676 max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; }
1678 #if __cplusplus >= 201103L
1679 static constexpr double
1680 lowest() noexcept { return -__DBL_MAX__; }
1683 static _GLIBCXX_USE_CONSTEXPR int digits = __DBL_MANT_DIG__;
1684 static _GLIBCXX_USE_CONSTEXPR int digits10 = __DBL_DIG__;
1685 #if __cplusplus >= 201103L
1686 static constexpr int max_digits10
1687 = __glibcxx_max_digits10 (__DBL_MANT_DIG__);
1689 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1690 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
1691 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
1692 static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
1694 static _GLIBCXX_CONSTEXPR double
1695 epsilon() _GLIBCXX_USE_NOEXCEPT { return __DBL_EPSILON__; }
1697 static _GLIBCXX_CONSTEXPR double
1698 round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5; }
1700 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __DBL_MIN_EXP__;
1701 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __DBL_MIN_10_EXP__;
1702 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __DBL_MAX_EXP__;
1703 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __DBL_MAX_10_EXP__;
1705 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __DBL_HAS_INFINITY__;
1706 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __DBL_HAS_QUIET_NAN__;
1707 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
1708 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1709 = bool(__DBL_HAS_DENORM__) ? denorm_present : denorm_absent;
1710 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
1711 = __glibcxx_double_has_denorm_loss;
1713 static _GLIBCXX_CONSTEXPR double
1714 infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_val(); }
1716 static _GLIBCXX_CONSTEXPR double
1717 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nan(""); }
1719 static _GLIBCXX_CONSTEXPR double
1720 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nans(""); }
1722 static _GLIBCXX_CONSTEXPR double
1723 denorm_min() _GLIBCXX_USE_NOEXCEPT { return __DBL_DENORM_MIN__; }
1725 static _GLIBCXX_USE_CONSTEXPR bool is_iec559
1726 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
1727 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1728 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1730 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_double_traps;
1731 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before
1732 = __glibcxx_double_tinyness_before;
1733 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1737 #undef __glibcxx_double_has_denorm_loss
1738 #undef __glibcxx_double_traps
1739 #undef __glibcxx_double_tinyness_before
1741 /// numeric_limits<long double> specialization.
1743 struct numeric_limits<long double>
1745 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1747 static _GLIBCXX_CONSTEXPR long double
1748 min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; }
1750 static _GLIBCXX_CONSTEXPR long double
1751 max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
1753 #if __cplusplus >= 201103L
1754 static constexpr long double
1755 lowest() noexcept { return -__LDBL_MAX__; }
1758 static _GLIBCXX_USE_CONSTEXPR int digits = __LDBL_MANT_DIG__;
1759 static _GLIBCXX_USE_CONSTEXPR int digits10 = __LDBL_DIG__;
1760 #if __cplusplus >= 201103L
1761 static _GLIBCXX_USE_CONSTEXPR int max_digits10
1762 = __glibcxx_max_digits10 (__LDBL_MANT_DIG__);
1764 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1765 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
1766 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
1767 static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
1769 static _GLIBCXX_CONSTEXPR long double
1770 epsilon() _GLIBCXX_USE_NOEXCEPT { return __LDBL_EPSILON__; }
1772 static _GLIBCXX_CONSTEXPR long double
1773 round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5L; }
1775 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __LDBL_MIN_EXP__;
1776 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __LDBL_MIN_10_EXP__;
1777 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __LDBL_MAX_EXP__;
1778 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __LDBL_MAX_10_EXP__;
1780 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __LDBL_HAS_INFINITY__;
1781 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__;
1782 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
1783 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1784 = bool(__LDBL_HAS_DENORM__) ? denorm_present : denorm_absent;
1785 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
1786 = __glibcxx_long_double_has_denorm_loss;
1788 static _GLIBCXX_CONSTEXPR long double
1789 infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_vall(); }
1791 static _GLIBCXX_CONSTEXPR long double
1792 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanl(""); }
1794 static _GLIBCXX_CONSTEXPR long double
1795 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansl(""); }
1797 static _GLIBCXX_CONSTEXPR long double
1798 denorm_min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_DENORM_MIN__; }
1800 static _GLIBCXX_USE_CONSTEXPR bool is_iec559
1801 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
1802 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1803 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1805 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_long_double_traps;
1806 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before =
1807 __glibcxx_long_double_tinyness_before;
1808 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style =
1812 #undef __glibcxx_long_double_has_denorm_loss
1813 #undef __glibcxx_long_double_traps
1814 #undef __glibcxx_long_double_tinyness_before
1816 _GLIBCXX_END_NAMESPACE_VERSION
1819 #undef __glibcxx_signed
1820 #undef __glibcxx_min
1821 #undef __glibcxx_max
1822 #undef __glibcxx_digits
1823 #undef __glibcxx_digits10
1824 #undef __glibcxx_max_digits10
1826 #endif // _GLIBCXX_NUMERIC_LIMITS