1 // The template and inlines for the numeric_limits classes. -*- C++ -*-
3 // Copyright (C) 1999-2017 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 template<typename _Tp>
312 struct numeric_limits : public __numeric_limits_base
314 /** The minimum finite value, or for floating types with
315 denormalization, the minimum positive normalized value. */
316 static _GLIBCXX_CONSTEXPR _Tp
317 min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
319 /** The maximum finite value. */
320 static _GLIBCXX_CONSTEXPR _Tp
321 max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
323 #if __cplusplus >= 201103L
324 /** A finite value x such that there is no other finite value y
327 lowest() noexcept { return _Tp(); }
330 /** The @e machine @e epsilon: the difference between 1 and the least
331 value greater than 1 that is representable. */
332 static _GLIBCXX_CONSTEXPR _Tp
333 epsilon() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
335 /** The maximum rounding error measurement (see LIA-1). */
336 static _GLIBCXX_CONSTEXPR _Tp
337 round_error() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
339 /** The representation of positive infinity, if @c has_infinity. */
340 static _GLIBCXX_CONSTEXPR _Tp
341 infinity() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
343 /** The representation of a quiet Not a Number,
344 if @c has_quiet_NaN. */
345 static _GLIBCXX_CONSTEXPR _Tp
346 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
348 /** The representation of a signaling Not a Number, if
349 @c has_signaling_NaN. */
350 static _GLIBCXX_CONSTEXPR _Tp
351 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
353 /** The minimum positive denormalized value. For types where
354 @c has_denorm is false, this is the minimum positive normalized
356 static _GLIBCXX_CONSTEXPR _Tp
357 denorm_min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); }
360 // _GLIBCXX_RESOLVE_LIB_DEFECTS
361 // 559. numeric_limits<const T>
363 template<typename _Tp>
364 struct numeric_limits<const _Tp>
365 : public numeric_limits<_Tp> { };
367 template<typename _Tp>
368 struct numeric_limits<volatile _Tp>
369 : public numeric_limits<_Tp> { };
371 template<typename _Tp>
372 struct numeric_limits<const volatile _Tp>
373 : public numeric_limits<_Tp> { };
375 // Now there follow 16 explicit specializations. Yes, 16. Make sure
376 // you get the count right. (18 in C++11 mode, with char16_t and char32_t.)
378 // _GLIBCXX_RESOLVE_LIB_DEFECTS
379 // 184. numeric_limits<bool> wording problems
381 /// numeric_limits<bool> specialization.
383 struct numeric_limits<bool>
385 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
387 static _GLIBCXX_CONSTEXPR bool
388 min() _GLIBCXX_USE_NOEXCEPT { return false; }
390 static _GLIBCXX_CONSTEXPR bool
391 max() _GLIBCXX_USE_NOEXCEPT { return true; }
393 #if __cplusplus >= 201103L
394 static constexpr bool
395 lowest() noexcept { return min(); }
397 static _GLIBCXX_USE_CONSTEXPR int digits = 1;
398 static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
399 #if __cplusplus >= 201103L
400 static constexpr int max_digits10 = 0;
402 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
403 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
404 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
405 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
407 static _GLIBCXX_CONSTEXPR bool
408 epsilon() _GLIBCXX_USE_NOEXCEPT { return false; }
410 static _GLIBCXX_CONSTEXPR bool
411 round_error() _GLIBCXX_USE_NOEXCEPT { return false; }
413 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
414 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
415 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
416 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
418 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
419 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
420 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
421 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
423 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
425 static _GLIBCXX_CONSTEXPR bool
426 infinity() _GLIBCXX_USE_NOEXCEPT { return false; }
428 static _GLIBCXX_CONSTEXPR bool
429 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return false; }
431 static _GLIBCXX_CONSTEXPR bool
432 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return false; }
434 static _GLIBCXX_CONSTEXPR bool
435 denorm_min() _GLIBCXX_USE_NOEXCEPT { return false; }
437 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
438 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
439 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
441 // It is not clear what it means for a boolean type to trap.
442 // This is a DR on the LWG issue list. Here, I use integer
443 // promotion semantics.
444 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
445 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
446 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
450 /// numeric_limits<char> specialization.
452 struct numeric_limits<char>
454 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
456 static _GLIBCXX_CONSTEXPR char
457 min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); }
459 static _GLIBCXX_CONSTEXPR char
460 max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); }
462 #if __cplusplus >= 201103L
463 static constexpr char
464 lowest() noexcept { return min(); }
467 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char);
468 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char);
469 #if __cplusplus >= 201103L
470 static constexpr int max_digits10 = 0;
472 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char);
473 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
474 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
475 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
477 static _GLIBCXX_CONSTEXPR char
478 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
480 static _GLIBCXX_CONSTEXPR char
481 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
483 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
484 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
485 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
486 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
488 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
489 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
490 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
491 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
493 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
495 static _GLIBCXX_CONSTEXPR
496 char infinity() _GLIBCXX_USE_NOEXCEPT { return char(); }
498 static _GLIBCXX_CONSTEXPR char
499 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); }
501 static _GLIBCXX_CONSTEXPR char
502 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); }
504 static _GLIBCXX_CONSTEXPR char
505 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<char>(0); }
507 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
508 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
509 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed;
511 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
512 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
513 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
517 /// numeric_limits<signed char> specialization.
519 struct numeric_limits<signed char>
521 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
523 static _GLIBCXX_CONSTEXPR signed char
524 min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; }
526 static _GLIBCXX_CONSTEXPR signed char
527 max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; }
529 #if __cplusplus >= 201103L
530 static constexpr signed char
531 lowest() noexcept { return min(); }
534 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (signed char);
535 static _GLIBCXX_USE_CONSTEXPR int digits10
536 = __glibcxx_digits10 (signed char);
537 #if __cplusplus >= 201103L
538 static constexpr int max_digits10 = 0;
540 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
541 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
542 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
543 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
545 static _GLIBCXX_CONSTEXPR signed char
546 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
548 static _GLIBCXX_CONSTEXPR signed char
549 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
551 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
552 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
553 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
554 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
556 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
557 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
558 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
559 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
561 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
563 static _GLIBCXX_CONSTEXPR signed char
564 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); }
566 static _GLIBCXX_CONSTEXPR signed char
567 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); }
569 static _GLIBCXX_CONSTEXPR signed char
570 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
571 { return static_cast<signed char>(0); }
573 static _GLIBCXX_CONSTEXPR signed char
574 denorm_min() _GLIBCXX_USE_NOEXCEPT
575 { return static_cast<signed char>(0); }
577 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
578 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
579 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
581 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
582 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
583 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
587 /// numeric_limits<unsigned char> specialization.
589 struct numeric_limits<unsigned char>
591 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
593 static _GLIBCXX_CONSTEXPR unsigned char
594 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
596 static _GLIBCXX_CONSTEXPR unsigned char
597 max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; }
599 #if __cplusplus >= 201103L
600 static constexpr unsigned char
601 lowest() noexcept { return min(); }
604 static _GLIBCXX_USE_CONSTEXPR int digits
605 = __glibcxx_digits (unsigned char);
606 static _GLIBCXX_USE_CONSTEXPR int digits10
607 = __glibcxx_digits10 (unsigned char);
608 #if __cplusplus >= 201103L
609 static constexpr int max_digits10 = 0;
611 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
612 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
613 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
614 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
616 static _GLIBCXX_CONSTEXPR unsigned char
617 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
619 static _GLIBCXX_CONSTEXPR unsigned char
620 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
622 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
623 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
624 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
625 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
627 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
628 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
629 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
630 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
632 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
634 static _GLIBCXX_CONSTEXPR unsigned char
635 infinity() _GLIBCXX_USE_NOEXCEPT
636 { return static_cast<unsigned char>(0); }
638 static _GLIBCXX_CONSTEXPR unsigned char
639 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
640 { return static_cast<unsigned char>(0); }
642 static _GLIBCXX_CONSTEXPR unsigned char
643 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
644 { return static_cast<unsigned char>(0); }
646 static _GLIBCXX_CONSTEXPR unsigned char
647 denorm_min() _GLIBCXX_USE_NOEXCEPT
648 { return static_cast<unsigned char>(0); }
650 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
651 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
652 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
654 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
655 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
656 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
660 /// numeric_limits<wchar_t> specialization.
662 struct numeric_limits<wchar_t>
664 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
666 static _GLIBCXX_CONSTEXPR wchar_t
667 min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); }
669 static _GLIBCXX_CONSTEXPR wchar_t
670 max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); }
672 #if __cplusplus >= 201103L
673 static constexpr wchar_t
674 lowest() noexcept { return min(); }
677 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (wchar_t);
678 static _GLIBCXX_USE_CONSTEXPR int digits10
679 = __glibcxx_digits10 (wchar_t);
680 #if __cplusplus >= 201103L
681 static constexpr int max_digits10 = 0;
683 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (wchar_t);
684 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
685 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
686 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
688 static _GLIBCXX_CONSTEXPR wchar_t
689 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
691 static _GLIBCXX_CONSTEXPR wchar_t
692 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
694 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
695 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
696 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
697 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
699 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
700 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
701 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
702 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
704 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
706 static _GLIBCXX_CONSTEXPR wchar_t
707 infinity() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
709 static _GLIBCXX_CONSTEXPR wchar_t
710 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
712 static _GLIBCXX_CONSTEXPR wchar_t
713 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
715 static _GLIBCXX_CONSTEXPR wchar_t
716 denorm_min() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
718 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
719 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
720 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed;
722 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
723 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
724 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
728 #if __cplusplus >= 201103L
729 /// numeric_limits<char16_t> specialization.
731 struct numeric_limits<char16_t>
733 static constexpr bool is_specialized = true;
735 static constexpr char16_t
736 min() noexcept { return __glibcxx_min (char16_t); }
738 static constexpr char16_t
739 max() noexcept { return __glibcxx_max (char16_t); }
741 static constexpr char16_t
742 lowest() noexcept { return min(); }
744 static constexpr int digits = __glibcxx_digits (char16_t);
745 static constexpr int digits10 = __glibcxx_digits10 (char16_t);
746 static constexpr int max_digits10 = 0;
747 static constexpr bool is_signed = __glibcxx_signed (char16_t);
748 static constexpr bool is_integer = true;
749 static constexpr bool is_exact = true;
750 static constexpr int radix = 2;
752 static constexpr char16_t
753 epsilon() noexcept { return 0; }
755 static constexpr char16_t
756 round_error() noexcept { return 0; }
758 static constexpr int min_exponent = 0;
759 static constexpr int min_exponent10 = 0;
760 static constexpr int max_exponent = 0;
761 static constexpr int max_exponent10 = 0;
763 static constexpr bool has_infinity = false;
764 static constexpr bool has_quiet_NaN = false;
765 static constexpr bool has_signaling_NaN = false;
766 static constexpr float_denorm_style has_denorm = denorm_absent;
767 static constexpr bool has_denorm_loss = false;
769 static constexpr char16_t
770 infinity() noexcept { return char16_t(); }
772 static constexpr char16_t
773 quiet_NaN() noexcept { return char16_t(); }
775 static constexpr char16_t
776 signaling_NaN() noexcept { return char16_t(); }
778 static constexpr char16_t
779 denorm_min() noexcept { return char16_t(); }
781 static constexpr bool is_iec559 = false;
782 static constexpr bool is_bounded = true;
783 static constexpr bool is_modulo = !is_signed;
785 static constexpr bool traps = __glibcxx_integral_traps;
786 static constexpr bool tinyness_before = false;
787 static constexpr float_round_style round_style = round_toward_zero;
790 /// numeric_limits<char32_t> specialization.
792 struct numeric_limits<char32_t>
794 static constexpr bool is_specialized = true;
796 static constexpr char32_t
797 min() noexcept { return __glibcxx_min (char32_t); }
799 static constexpr char32_t
800 max() noexcept { return __glibcxx_max (char32_t); }
802 static constexpr char32_t
803 lowest() noexcept { return min(); }
805 static constexpr int digits = __glibcxx_digits (char32_t);
806 static constexpr int digits10 = __glibcxx_digits10 (char32_t);
807 static constexpr int max_digits10 = 0;
808 static constexpr bool is_signed = __glibcxx_signed (char32_t);
809 static constexpr bool is_integer = true;
810 static constexpr bool is_exact = true;
811 static constexpr int radix = 2;
813 static constexpr char32_t
814 epsilon() noexcept { return 0; }
816 static constexpr char32_t
817 round_error() noexcept { return 0; }
819 static constexpr int min_exponent = 0;
820 static constexpr int min_exponent10 = 0;
821 static constexpr int max_exponent = 0;
822 static constexpr int max_exponent10 = 0;
824 static constexpr bool has_infinity = false;
825 static constexpr bool has_quiet_NaN = false;
826 static constexpr bool has_signaling_NaN = false;
827 static constexpr float_denorm_style has_denorm = denorm_absent;
828 static constexpr bool has_denorm_loss = false;
830 static constexpr char32_t
831 infinity() noexcept { return char32_t(); }
833 static constexpr char32_t
834 quiet_NaN() noexcept { return char32_t(); }
836 static constexpr char32_t
837 signaling_NaN() noexcept { return char32_t(); }
839 static constexpr char32_t
840 denorm_min() noexcept { return char32_t(); }
842 static constexpr bool is_iec559 = false;
843 static constexpr bool is_bounded = true;
844 static constexpr bool is_modulo = !is_signed;
846 static constexpr bool traps = __glibcxx_integral_traps;
847 static constexpr bool tinyness_before = false;
848 static constexpr float_round_style round_style = round_toward_zero;
852 /// numeric_limits<short> specialization.
854 struct numeric_limits<short>
856 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
858 static _GLIBCXX_CONSTEXPR short
859 min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; }
861 static _GLIBCXX_CONSTEXPR short
862 max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; }
864 #if __cplusplus >= 201103L
865 static constexpr short
866 lowest() noexcept { return min(); }
869 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (short);
870 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (short);
871 #if __cplusplus >= 201103L
872 static constexpr int max_digits10 = 0;
874 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
875 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
876 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
877 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
879 static _GLIBCXX_CONSTEXPR short
880 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
882 static _GLIBCXX_CONSTEXPR short
883 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
885 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
886 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
887 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
888 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
890 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
891 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
892 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
893 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
895 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
897 static _GLIBCXX_CONSTEXPR short
898 infinity() _GLIBCXX_USE_NOEXCEPT { return short(); }
900 static _GLIBCXX_CONSTEXPR short
901 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); }
903 static _GLIBCXX_CONSTEXPR short
904 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); }
906 static _GLIBCXX_CONSTEXPR short
907 denorm_min() _GLIBCXX_USE_NOEXCEPT { return short(); }
909 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
910 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
911 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
913 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
914 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
915 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
919 /// numeric_limits<unsigned short> specialization.
921 struct numeric_limits<unsigned short>
923 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
925 static _GLIBCXX_CONSTEXPR unsigned short
926 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
928 static _GLIBCXX_CONSTEXPR unsigned short
929 max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; }
931 #if __cplusplus >= 201103L
932 static constexpr unsigned short
933 lowest() noexcept { return min(); }
936 static _GLIBCXX_USE_CONSTEXPR int digits
937 = __glibcxx_digits (unsigned short);
938 static _GLIBCXX_USE_CONSTEXPR int digits10
939 = __glibcxx_digits10 (unsigned short);
940 #if __cplusplus >= 201103L
941 static constexpr int max_digits10 = 0;
943 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
944 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
945 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
946 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
948 static _GLIBCXX_CONSTEXPR unsigned short
949 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
951 static _GLIBCXX_CONSTEXPR unsigned short
952 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
954 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
955 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
956 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
957 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
959 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
960 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
961 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
962 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
964 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
966 static _GLIBCXX_CONSTEXPR unsigned short
967 infinity() _GLIBCXX_USE_NOEXCEPT
968 { return static_cast<unsigned short>(0); }
970 static _GLIBCXX_CONSTEXPR unsigned short
971 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
972 { return static_cast<unsigned short>(0); }
974 static _GLIBCXX_CONSTEXPR unsigned short
975 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
976 { return static_cast<unsigned short>(0); }
978 static _GLIBCXX_CONSTEXPR unsigned short
979 denorm_min() _GLIBCXX_USE_NOEXCEPT
980 { return static_cast<unsigned short>(0); }
982 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
983 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
984 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
986 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
987 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
988 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
992 /// numeric_limits<int> specialization.
994 struct numeric_limits<int>
996 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
998 static _GLIBCXX_CONSTEXPR int
999 min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; }
1001 static _GLIBCXX_CONSTEXPR int
1002 max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; }
1004 #if __cplusplus >= 201103L
1005 static constexpr int
1006 lowest() noexcept { return min(); }
1009 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (int);
1010 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (int);
1011 #if __cplusplus >= 201103L
1012 static constexpr int max_digits10 = 0;
1014 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1015 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1016 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1017 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1019 static _GLIBCXX_CONSTEXPR int
1020 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1022 static _GLIBCXX_CONSTEXPR int
1023 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1025 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1026 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1027 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1028 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1030 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1031 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1032 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1033 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1035 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1037 static _GLIBCXX_CONSTEXPR int
1038 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1040 static _GLIBCXX_CONSTEXPR int
1041 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1043 static _GLIBCXX_CONSTEXPR int
1044 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1046 static _GLIBCXX_CONSTEXPR int
1047 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1049 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1050 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1051 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1053 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1054 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1055 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1056 = round_toward_zero;
1059 /// numeric_limits<unsigned int> specialization.
1061 struct numeric_limits<unsigned int>
1063 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1065 static _GLIBCXX_CONSTEXPR unsigned int
1066 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
1068 static _GLIBCXX_CONSTEXPR unsigned int
1069 max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; }
1071 #if __cplusplus >= 201103L
1072 static constexpr unsigned int
1073 lowest() noexcept { return min(); }
1076 static _GLIBCXX_USE_CONSTEXPR int digits
1077 = __glibcxx_digits (unsigned int);
1078 static _GLIBCXX_USE_CONSTEXPR int digits10
1079 = __glibcxx_digits10 (unsigned int);
1080 #if __cplusplus >= 201103L
1081 static constexpr int max_digits10 = 0;
1083 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
1084 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1085 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1086 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1088 static _GLIBCXX_CONSTEXPR unsigned int
1089 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1091 static _GLIBCXX_CONSTEXPR unsigned int
1092 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1094 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1095 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1096 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1097 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1099 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1100 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1101 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1102 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1104 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1106 static _GLIBCXX_CONSTEXPR unsigned int
1107 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned int>(0); }
1109 static _GLIBCXX_CONSTEXPR unsigned int
1110 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
1111 { return static_cast<unsigned int>(0); }
1113 static _GLIBCXX_CONSTEXPR unsigned int
1114 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1115 { return static_cast<unsigned int>(0); }
1117 static _GLIBCXX_CONSTEXPR unsigned int
1118 denorm_min() _GLIBCXX_USE_NOEXCEPT
1119 { return static_cast<unsigned int>(0); }
1121 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1122 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1123 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
1125 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1126 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1127 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1128 = round_toward_zero;
1131 /// numeric_limits<long> specialization.
1133 struct numeric_limits<long>
1135 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1137 static _GLIBCXX_CONSTEXPR long
1138 min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; }
1140 static _GLIBCXX_CONSTEXPR long
1141 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; }
1143 #if __cplusplus >= 201103L
1144 static constexpr long
1145 lowest() noexcept { return min(); }
1148 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long);
1149 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (long);
1150 #if __cplusplus >= 201103L
1151 static constexpr int max_digits10 = 0;
1153 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1154 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1155 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1156 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1158 static _GLIBCXX_CONSTEXPR long
1159 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1161 static _GLIBCXX_CONSTEXPR long
1162 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1164 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1165 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1166 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1167 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1169 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1170 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1171 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1172 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1174 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1176 static _GLIBCXX_CONSTEXPR long
1177 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1179 static _GLIBCXX_CONSTEXPR long
1180 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1182 static _GLIBCXX_CONSTEXPR long
1183 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1185 static _GLIBCXX_CONSTEXPR long
1186 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1188 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1189 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1190 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1192 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1193 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1194 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1195 = round_toward_zero;
1198 /// numeric_limits<unsigned long> specialization.
1200 struct numeric_limits<unsigned long>
1202 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1204 static _GLIBCXX_CONSTEXPR unsigned long
1205 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
1207 static _GLIBCXX_CONSTEXPR unsigned long
1208 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; }
1210 #if __cplusplus >= 201103L
1211 static constexpr unsigned long
1212 lowest() noexcept { return min(); }
1215 static _GLIBCXX_USE_CONSTEXPR int digits
1216 = __glibcxx_digits (unsigned long);
1217 static _GLIBCXX_USE_CONSTEXPR int digits10
1218 = __glibcxx_digits10 (unsigned long);
1219 #if __cplusplus >= 201103L
1220 static constexpr int max_digits10 = 0;
1222 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
1223 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1224 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1225 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1227 static _GLIBCXX_CONSTEXPR unsigned long
1228 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1230 static _GLIBCXX_CONSTEXPR unsigned long
1231 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1233 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1234 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1235 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1236 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1238 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1239 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1240 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1241 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1243 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1245 static _GLIBCXX_CONSTEXPR unsigned long
1246 infinity() _GLIBCXX_USE_NOEXCEPT
1247 { return static_cast<unsigned long>(0); }
1249 static _GLIBCXX_CONSTEXPR unsigned long
1250 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
1251 { return static_cast<unsigned long>(0); }
1253 static _GLIBCXX_CONSTEXPR unsigned long
1254 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1255 { return static_cast<unsigned long>(0); }
1257 static _GLIBCXX_CONSTEXPR unsigned long
1258 denorm_min() _GLIBCXX_USE_NOEXCEPT
1259 { return static_cast<unsigned long>(0); }
1261 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1262 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1263 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
1265 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1266 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1267 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1268 = round_toward_zero;
1271 /// numeric_limits<long long> specialization.
1273 struct numeric_limits<long long>
1275 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1277 static _GLIBCXX_CONSTEXPR long long
1278 min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; }
1280 static _GLIBCXX_CONSTEXPR long long
1281 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; }
1283 #if __cplusplus >= 201103L
1284 static constexpr long long
1285 lowest() noexcept { return min(); }
1288 static _GLIBCXX_USE_CONSTEXPR int digits
1289 = __glibcxx_digits (long long);
1290 static _GLIBCXX_USE_CONSTEXPR int digits10
1291 = __glibcxx_digits10 (long long);
1292 #if __cplusplus >= 201103L
1293 static constexpr int max_digits10 = 0;
1295 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1296 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1297 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1298 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1300 static _GLIBCXX_CONSTEXPR long long
1301 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1303 static _GLIBCXX_CONSTEXPR long long
1304 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1306 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1307 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1308 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1309 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1311 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1312 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1313 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1314 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1316 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1318 static _GLIBCXX_CONSTEXPR long long
1319 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
1321 static _GLIBCXX_CONSTEXPR long long
1322 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
1324 static _GLIBCXX_CONSTEXPR long long
1325 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1326 { return static_cast<long long>(0); }
1328 static _GLIBCXX_CONSTEXPR long long
1329 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
1331 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1332 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1333 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1335 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1336 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1337 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1338 = round_toward_zero;
1341 /// numeric_limits<unsigned long long> specialization.
1343 struct numeric_limits<unsigned long long>
1345 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1347 static _GLIBCXX_CONSTEXPR unsigned long long
1348 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
1350 static _GLIBCXX_CONSTEXPR unsigned long long
1351 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; }
1353 #if __cplusplus >= 201103L
1354 static constexpr unsigned long long
1355 lowest() noexcept { return min(); }
1358 static _GLIBCXX_USE_CONSTEXPR int digits
1359 = __glibcxx_digits (unsigned long long);
1360 static _GLIBCXX_USE_CONSTEXPR int digits10
1361 = __glibcxx_digits10 (unsigned long long);
1362 #if __cplusplus >= 201103L
1363 static constexpr int max_digits10 = 0;
1365 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
1366 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1367 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1368 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1370 static _GLIBCXX_CONSTEXPR unsigned long long
1371 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1373 static _GLIBCXX_CONSTEXPR unsigned long long
1374 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1376 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1377 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1378 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1379 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1381 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1382 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1383 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1384 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1386 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1388 static _GLIBCXX_CONSTEXPR unsigned long long
1389 infinity() _GLIBCXX_USE_NOEXCEPT
1390 { return static_cast<unsigned long long>(0); }
1392 static _GLIBCXX_CONSTEXPR unsigned long long
1393 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
1394 { return static_cast<unsigned long long>(0); }
1396 static _GLIBCXX_CONSTEXPR unsigned long long
1397 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1398 { return static_cast<unsigned long long>(0); }
1400 static _GLIBCXX_CONSTEXPR unsigned long long
1401 denorm_min() _GLIBCXX_USE_NOEXCEPT
1402 { return static_cast<unsigned long long>(0); }
1404 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1405 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1406 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
1408 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1409 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1410 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1411 = round_toward_zero;
1414 #if !defined(__STRICT_ANSI__)
1416 #define __INT_N(TYPE, BITSIZE, EXT, UEXT) \
1418 struct numeric_limits<TYPE> \
1420 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \
1422 static _GLIBCXX_CONSTEXPR TYPE \
1423 min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min_b (TYPE, BITSIZE); } \
1425 static _GLIBCXX_CONSTEXPR TYPE \
1426 max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max_b (TYPE, BITSIZE); } \
1428 static _GLIBCXX_USE_CONSTEXPR int digits \
1430 static _GLIBCXX_USE_CONSTEXPR int digits10 \
1431 = (BITSIZE - 1) * 643L / 2136; \
1433 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; \
1434 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \
1435 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \
1436 static _GLIBCXX_USE_CONSTEXPR int radix = 2; \
1438 static _GLIBCXX_CONSTEXPR TYPE \
1439 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1441 static _GLIBCXX_CONSTEXPR TYPE \
1442 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1446 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; \
1447 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; \
1448 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; \
1449 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; \
1451 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; \
1452 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; \
1453 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; \
1454 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm \
1456 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; \
1458 static _GLIBCXX_CONSTEXPR TYPE \
1459 infinity() _GLIBCXX_USE_NOEXCEPT \
1460 { return static_cast<TYPE>(0); } \
1462 static _GLIBCXX_CONSTEXPR TYPE \
1463 quiet_NaN() _GLIBCXX_USE_NOEXCEPT \
1464 { return static_cast<TYPE>(0); } \
1466 static _GLIBCXX_CONSTEXPR TYPE \
1467 signaling_NaN() _GLIBCXX_USE_NOEXCEPT \
1468 { return static_cast<TYPE>(0); } \
1470 static _GLIBCXX_CONSTEXPR TYPE \
1471 denorm_min() _GLIBCXX_USE_NOEXCEPT \
1472 { return static_cast<TYPE>(0); } \
1474 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; \
1475 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; \
1476 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; \
1478 static _GLIBCXX_USE_CONSTEXPR bool traps \
1479 = __glibcxx_integral_traps; \
1480 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; \
1481 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style \
1482 = round_toward_zero; \
1486 struct numeric_limits<unsigned TYPE> \
1488 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \
1490 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1491 min() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1493 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1494 max() _GLIBCXX_USE_NOEXCEPT \
1495 { return __glibcxx_max_b (unsigned TYPE, BITSIZE); } \
1499 static _GLIBCXX_USE_CONSTEXPR int digits \
1501 static _GLIBCXX_USE_CONSTEXPR int digits10 \
1502 = BITSIZE * 643L / 2136; \
1503 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; \
1504 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \
1505 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \
1506 static _GLIBCXX_USE_CONSTEXPR int radix = 2; \
1508 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1509 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1511 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1512 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1514 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; \
1515 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; \
1516 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; \
1517 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; \
1519 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; \
1520 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; \
1521 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; \
1522 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm \
1524 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; \
1526 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1527 infinity() _GLIBCXX_USE_NOEXCEPT \
1528 { return static_cast<unsigned TYPE>(0); } \
1530 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1531 quiet_NaN() _GLIBCXX_USE_NOEXCEPT \
1532 { return static_cast<unsigned TYPE>(0); } \
1534 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1535 signaling_NaN() _GLIBCXX_USE_NOEXCEPT \
1536 { return static_cast<unsigned TYPE>(0); } \
1538 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1539 denorm_min() _GLIBCXX_USE_NOEXCEPT \
1540 { return static_cast<unsigned TYPE>(0); } \
1542 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; \
1543 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; \
1544 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; \
1546 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; \
1547 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; \
1548 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style \
1549 = round_toward_zero; \
1552 #if __cplusplus >= 201103L
1554 #define __INT_N_201103(TYPE) \
1555 static constexpr TYPE \
1556 lowest() noexcept { return min(); } \
1557 static constexpr int max_digits10 = 0;
1559 #define __INT_N_U201103(TYPE) \
1560 static constexpr unsigned TYPE \
1561 lowest() noexcept { return min(); } \
1562 static constexpr int max_digits10 = 0;
1565 #define __INT_N_201103(TYPE)
1566 #define __INT_N_U201103(TYPE)
1569 #ifdef __GLIBCXX_TYPE_INT_N_0
1570 __INT_N(__GLIBCXX_TYPE_INT_N_0, __GLIBCXX_BITSIZE_INT_N_0,
1571 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_0), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_0))
1573 #ifdef __GLIBCXX_TYPE_INT_N_1
1574 __INT_N (__GLIBCXX_TYPE_INT_N_1, __GLIBCXX_BITSIZE_INT_N_1,
1575 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_1), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_1))
1577 #ifdef __GLIBCXX_TYPE_INT_N_2
1578 __INT_N (__GLIBCXX_TYPE_INT_N_2, __GLIBCXX_BITSIZE_INT_N_2,
1579 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_2), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_2))
1581 #ifdef __GLIBCXX_TYPE_INT_N_3
1582 __INT_N (__GLIBCXX_TYPE_INT_N_3, __GLIBCXX_BITSIZE_INT_N_3,
1583 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_3), __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_3))
1587 #undef __INT_N_201103
1588 #undef __INT_N_U201103
1592 /// numeric_limits<float> specialization.
1594 struct numeric_limits<float>
1596 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1598 static _GLIBCXX_CONSTEXPR float
1599 min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
1601 static _GLIBCXX_CONSTEXPR float
1602 max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; }
1604 #if __cplusplus >= 201103L
1605 static constexpr float
1606 lowest() noexcept { return -__FLT_MAX__; }
1609 static _GLIBCXX_USE_CONSTEXPR int digits = __FLT_MANT_DIG__;
1610 static _GLIBCXX_USE_CONSTEXPR int digits10 = __FLT_DIG__;
1611 #if __cplusplus >= 201103L
1612 static constexpr int max_digits10
1613 = __glibcxx_max_digits10 (__FLT_MANT_DIG__);
1615 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1616 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
1617 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
1618 static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
1620 static _GLIBCXX_CONSTEXPR float
1621 epsilon() _GLIBCXX_USE_NOEXCEPT { return __FLT_EPSILON__; }
1623 static _GLIBCXX_CONSTEXPR float
1624 round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5F; }
1626 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __FLT_MIN_EXP__;
1627 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __FLT_MIN_10_EXP__;
1628 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __FLT_MAX_EXP__;
1629 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __FLT_MAX_10_EXP__;
1631 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __FLT_HAS_INFINITY__;
1632 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __FLT_HAS_QUIET_NAN__;
1633 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
1634 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1635 = bool(__FLT_HAS_DENORM__) ? denorm_present : denorm_absent;
1636 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
1637 = __glibcxx_float_has_denorm_loss;
1639 static _GLIBCXX_CONSTEXPR float
1640 infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_valf(); }
1642 static _GLIBCXX_CONSTEXPR float
1643 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanf(""); }
1645 static _GLIBCXX_CONSTEXPR float
1646 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansf(""); }
1648 static _GLIBCXX_CONSTEXPR float
1649 denorm_min() _GLIBCXX_USE_NOEXCEPT { return __FLT_DENORM_MIN__; }
1651 static _GLIBCXX_USE_CONSTEXPR bool is_iec559
1652 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
1653 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1654 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1656 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_float_traps;
1657 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before
1658 = __glibcxx_float_tinyness_before;
1659 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1663 #undef __glibcxx_float_has_denorm_loss
1664 #undef __glibcxx_float_traps
1665 #undef __glibcxx_float_tinyness_before
1667 /// numeric_limits<double> specialization.
1669 struct numeric_limits<double>
1671 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1673 static _GLIBCXX_CONSTEXPR double
1674 min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; }
1676 static _GLIBCXX_CONSTEXPR double
1677 max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; }
1679 #if __cplusplus >= 201103L
1680 static constexpr double
1681 lowest() noexcept { return -__DBL_MAX__; }
1684 static _GLIBCXX_USE_CONSTEXPR int digits = __DBL_MANT_DIG__;
1685 static _GLIBCXX_USE_CONSTEXPR int digits10 = __DBL_DIG__;
1686 #if __cplusplus >= 201103L
1687 static constexpr int max_digits10
1688 = __glibcxx_max_digits10 (__DBL_MANT_DIG__);
1690 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1691 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
1692 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
1693 static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
1695 static _GLIBCXX_CONSTEXPR double
1696 epsilon() _GLIBCXX_USE_NOEXCEPT { return __DBL_EPSILON__; }
1698 static _GLIBCXX_CONSTEXPR double
1699 round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5; }
1701 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __DBL_MIN_EXP__;
1702 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __DBL_MIN_10_EXP__;
1703 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __DBL_MAX_EXP__;
1704 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __DBL_MAX_10_EXP__;
1706 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __DBL_HAS_INFINITY__;
1707 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __DBL_HAS_QUIET_NAN__;
1708 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
1709 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1710 = bool(__DBL_HAS_DENORM__) ? denorm_present : denorm_absent;
1711 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
1712 = __glibcxx_double_has_denorm_loss;
1714 static _GLIBCXX_CONSTEXPR double
1715 infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_val(); }
1717 static _GLIBCXX_CONSTEXPR double
1718 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nan(""); }
1720 static _GLIBCXX_CONSTEXPR double
1721 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nans(""); }
1723 static _GLIBCXX_CONSTEXPR double
1724 denorm_min() _GLIBCXX_USE_NOEXCEPT { return __DBL_DENORM_MIN__; }
1726 static _GLIBCXX_USE_CONSTEXPR bool is_iec559
1727 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
1728 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1729 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1731 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_double_traps;
1732 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before
1733 = __glibcxx_double_tinyness_before;
1734 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1738 #undef __glibcxx_double_has_denorm_loss
1739 #undef __glibcxx_double_traps
1740 #undef __glibcxx_double_tinyness_before
1742 /// numeric_limits<long double> specialization.
1744 struct numeric_limits<long double>
1746 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1748 static _GLIBCXX_CONSTEXPR long double
1749 min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; }
1751 static _GLIBCXX_CONSTEXPR long double
1752 max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
1754 #if __cplusplus >= 201103L
1755 static constexpr long double
1756 lowest() noexcept { return -__LDBL_MAX__; }
1759 static _GLIBCXX_USE_CONSTEXPR int digits = __LDBL_MANT_DIG__;
1760 static _GLIBCXX_USE_CONSTEXPR int digits10 = __LDBL_DIG__;
1761 #if __cplusplus >= 201103L
1762 static _GLIBCXX_USE_CONSTEXPR int max_digits10
1763 = __glibcxx_max_digits10 (__LDBL_MANT_DIG__);
1765 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1766 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
1767 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
1768 static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
1770 static _GLIBCXX_CONSTEXPR long double
1771 epsilon() _GLIBCXX_USE_NOEXCEPT { return __LDBL_EPSILON__; }
1773 static _GLIBCXX_CONSTEXPR long double
1774 round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5L; }
1776 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __LDBL_MIN_EXP__;
1777 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __LDBL_MIN_10_EXP__;
1778 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __LDBL_MAX_EXP__;
1779 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __LDBL_MAX_10_EXP__;
1781 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __LDBL_HAS_INFINITY__;
1782 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__;
1783 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
1784 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1785 = bool(__LDBL_HAS_DENORM__) ? denorm_present : denorm_absent;
1786 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
1787 = __glibcxx_long_double_has_denorm_loss;
1789 static _GLIBCXX_CONSTEXPR long double
1790 infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_vall(); }
1792 static _GLIBCXX_CONSTEXPR long double
1793 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanl(""); }
1795 static _GLIBCXX_CONSTEXPR long double
1796 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansl(""); }
1798 static _GLIBCXX_CONSTEXPR long double
1799 denorm_min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_DENORM_MIN__; }
1801 static _GLIBCXX_USE_CONSTEXPR bool is_iec559
1802 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
1803 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1804 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1806 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_long_double_traps;
1807 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before =
1808 __glibcxx_long_double_tinyness_before;
1809 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style =
1813 #undef __glibcxx_long_double_has_denorm_loss
1814 #undef __glibcxx_long_double_traps
1815 #undef __glibcxx_long_double_tinyness_before
1817 _GLIBCXX_END_NAMESPACE_VERSION
1820 #undef __glibcxx_signed
1821 #undef __glibcxx_min
1822 #undef __glibcxx_max
1823 #undef __glibcxx_digits
1824 #undef __glibcxx_digits10
1825 #undef __glibcxx_max_digits10
1827 #endif // _GLIBCXX_NUMERIC_LIMITS