1// The template and inlines for the numeric_limits classes. -*- C++ -*-
3// Copyright (C) 1999-2021 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)
158namespace 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.)
377 // (+1 if char8_t is enabled.)
379 // _GLIBCXX_RESOLVE_LIB_DEFECTS
380 // 184. numeric_limits<bool> wording problems
382 /// numeric_limits<bool> specialization.
384 struct numeric_limits<bool>
386 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
388 static _GLIBCXX_CONSTEXPR bool
389 min() _GLIBCXX_USE_NOEXCEPT { return false; }
391 static _GLIBCXX_CONSTEXPR bool
392 max() _GLIBCXX_USE_NOEXCEPT { return true; }
394#if __cplusplus >= 201103L
395 static constexpr bool
396 lowest() noexcept { return min(); }
398 static _GLIBCXX_USE_CONSTEXPR int digits = 1;
399 static _GLIBCXX_USE_CONSTEXPR int digits10 = 0;
400#if __cplusplus >= 201103L
401 static constexpr int max_digits10 = 0;
403 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
404 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
405 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
406 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
408 static _GLIBCXX_CONSTEXPR bool
409 epsilon() _GLIBCXX_USE_NOEXCEPT { return false; }
411 static _GLIBCXX_CONSTEXPR bool
412 round_error() _GLIBCXX_USE_NOEXCEPT { return false; }
414 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
415 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
416 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
417 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
419 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
420 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
421 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
422 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
424 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
426 static _GLIBCXX_CONSTEXPR bool
427 infinity() _GLIBCXX_USE_NOEXCEPT { return false; }
429 static _GLIBCXX_CONSTEXPR bool
430 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return false; }
432 static _GLIBCXX_CONSTEXPR bool
433 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return false; }
435 static _GLIBCXX_CONSTEXPR bool
436 denorm_min() _GLIBCXX_USE_NOEXCEPT { return false; }
438 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
439 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
440 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
442 // It is not clear what it means for a boolean type to trap.
443 // This is a DR on the LWG issue list. Here, I use integer
444 // promotion semantics.
445 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
446 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
447 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
451 /// numeric_limits<char> specialization.
453 struct numeric_limits<char>
455 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
457 static _GLIBCXX_CONSTEXPR char
458 min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); }
460 static _GLIBCXX_CONSTEXPR char
461 max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); }
463#if __cplusplus >= 201103L
464 static constexpr char
465 lowest() noexcept { return min(); }
468 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char);
469 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char);
470#if __cplusplus >= 201103L
471 static constexpr int max_digits10 = 0;
473 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char);
474 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
475 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
476 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
478 static _GLIBCXX_CONSTEXPR char
479 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
481 static _GLIBCXX_CONSTEXPR char
482 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
484 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
485 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
486 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
487 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
489 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
490 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
491 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
492 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
494 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
496 static _GLIBCXX_CONSTEXPR
497 char infinity() _GLIBCXX_USE_NOEXCEPT { return char(); }
499 static _GLIBCXX_CONSTEXPR char
500 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); }
502 static _GLIBCXX_CONSTEXPR char
503 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); }
505 static _GLIBCXX_CONSTEXPR char
506 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<char>(0); }
508 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
509 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
510 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed;
512 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
513 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
514 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
518 /// numeric_limits<signed char> specialization.
520 struct numeric_limits<signed char>
522 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
524 static _GLIBCXX_CONSTEXPR signed char
525 min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; }
527 static _GLIBCXX_CONSTEXPR signed char
528 max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; }
530#if __cplusplus >= 201103L
531 static constexpr signed char
532 lowest() noexcept { return min(); }
535 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (signed char);
536 static _GLIBCXX_USE_CONSTEXPR int digits10
537 = __glibcxx_digits10 (signed char);
538#if __cplusplus >= 201103L
539 static constexpr int max_digits10 = 0;
541 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
542 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
543 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
544 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
546 static _GLIBCXX_CONSTEXPR signed char
547 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
549 static _GLIBCXX_CONSTEXPR signed char
550 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
552 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
553 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
554 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
555 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
557 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
558 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
559 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
560 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
562 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
564 static _GLIBCXX_CONSTEXPR signed char
565 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); }
567 static _GLIBCXX_CONSTEXPR signed char
568 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); }
570 static _GLIBCXX_CONSTEXPR signed char
571 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
572 { return static_cast<signed char>(0); }
574 static _GLIBCXX_CONSTEXPR signed char
575 denorm_min() _GLIBCXX_USE_NOEXCEPT
576 { return static_cast<signed char>(0); }
578 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
579 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
580 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
582 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
583 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
584 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
588 /// numeric_limits<unsigned char> specialization.
590 struct numeric_limits<unsigned char>
592 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
594 static _GLIBCXX_CONSTEXPR unsigned char
595 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
597 static _GLIBCXX_CONSTEXPR unsigned char
598 max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; }
600#if __cplusplus >= 201103L
601 static constexpr unsigned char
602 lowest() noexcept { return min(); }
605 static _GLIBCXX_USE_CONSTEXPR int digits
606 = __glibcxx_digits (unsigned char);
607 static _GLIBCXX_USE_CONSTEXPR int digits10
608 = __glibcxx_digits10 (unsigned char);
609#if __cplusplus >= 201103L
610 static constexpr int max_digits10 = 0;
612 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
613 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
614 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
615 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
617 static _GLIBCXX_CONSTEXPR unsigned char
618 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
620 static _GLIBCXX_CONSTEXPR unsigned char
621 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
623 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
624 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
625 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
626 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
628 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
629 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
630 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
631 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
633 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
635 static _GLIBCXX_CONSTEXPR unsigned char
636 infinity() _GLIBCXX_USE_NOEXCEPT
637 { return static_cast<unsigned char>(0); }
639 static _GLIBCXX_CONSTEXPR unsigned char
640 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
641 { return static_cast<unsigned char>(0); }
643 static _GLIBCXX_CONSTEXPR unsigned char
644 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
645 { return static_cast<unsigned char>(0); }
647 static _GLIBCXX_CONSTEXPR unsigned char
648 denorm_min() _GLIBCXX_USE_NOEXCEPT
649 { return static_cast<unsigned char>(0); }
651 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
652 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
653 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
655 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
656 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
657 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
661 /// numeric_limits<wchar_t> specialization.
663 struct numeric_limits<wchar_t>
665 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
667 static _GLIBCXX_CONSTEXPR wchar_t
668 min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); }
670 static _GLIBCXX_CONSTEXPR wchar_t
671 max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); }
673#if __cplusplus >= 201103L
674 static constexpr wchar_t
675 lowest() noexcept { return min(); }
678 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (wchar_t);
679 static _GLIBCXX_USE_CONSTEXPR int digits10
680 = __glibcxx_digits10 (wchar_t);
681#if __cplusplus >= 201103L
682 static constexpr int max_digits10 = 0;
684 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (wchar_t);
685 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
686 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
687 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
689 static _GLIBCXX_CONSTEXPR wchar_t
690 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
692 static _GLIBCXX_CONSTEXPR wchar_t
693 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
695 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
696 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
697 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
698 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
700 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
701 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
702 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
703 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
705 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
707 static _GLIBCXX_CONSTEXPR wchar_t
708 infinity() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
710 static _GLIBCXX_CONSTEXPR wchar_t
711 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
713 static _GLIBCXX_CONSTEXPR wchar_t
714 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
716 static _GLIBCXX_CONSTEXPR wchar_t
717 denorm_min() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); }
719 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
720 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
721 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed;
723 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
724 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
725 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
729#if _GLIBCXX_USE_CHAR8_T
730 /// numeric_limits<char8_t> specialization.
732 struct numeric_limits<char8_t>
734 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
736 static _GLIBCXX_CONSTEXPR char8_t
737 min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (char8_t); }
739 static _GLIBCXX_CONSTEXPR char8_t
740 max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (char8_t); }
742 static _GLIBCXX_CONSTEXPR char8_t
743 lowest() _GLIBCXX_USE_NOEXCEPT { return min(); }
745 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char8_t);
746 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char8_t);
747 static _GLIBCXX_USE_CONSTEXPR int max_digits10 = 0;
748 static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char8_t);
749 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
750 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
751 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
753 static _GLIBCXX_CONSTEXPR char8_t
754 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
756 static _GLIBCXX_CONSTEXPR char8_t
757 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
759 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
760 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
761 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
762 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
764 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
765 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
766 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
767 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
769 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
771 static _GLIBCXX_CONSTEXPR char8_t
772 infinity() _GLIBCXX_USE_NOEXCEPT { return char8_t(); }
774 static _GLIBCXX_CONSTEXPR char8_t
775 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char8_t(); }
777 static _GLIBCXX_CONSTEXPR char8_t
778 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char8_t(); }
780 static _GLIBCXX_CONSTEXPR char8_t
781 denorm_min() _GLIBCXX_USE_NOEXCEPT { return char8_t(); }
783 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
784 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
785 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed;
787 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
788 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
789 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
794#if __cplusplus >= 201103L
795 /// numeric_limits<char16_t> specialization.
797 struct numeric_limits<char16_t>
799 static constexpr bool is_specialized = true;
801 static constexpr char16_t
802 min() noexcept { return __glibcxx_min (char16_t); }
804 static constexpr char16_t
805 max() noexcept { return __glibcxx_max (char16_t); }
807 static constexpr char16_t
808 lowest() noexcept { return min(); }
810 static constexpr int digits = __glibcxx_digits (char16_t);
811 static constexpr int digits10 = __glibcxx_digits10 (char16_t);
812 static constexpr int max_digits10 = 0;
813 static constexpr bool is_signed = __glibcxx_signed (char16_t);
814 static constexpr bool is_integer = true;
815 static constexpr bool is_exact = true;
816 static constexpr int radix = 2;
818 static constexpr char16_t
819 epsilon() noexcept { return 0; }
821 static constexpr char16_t
822 round_error() noexcept { return 0; }
824 static constexpr int min_exponent = 0;
825 static constexpr int min_exponent10 = 0;
826 static constexpr int max_exponent = 0;
827 static constexpr int max_exponent10 = 0;
829 static constexpr bool has_infinity = false;
830 static constexpr bool has_quiet_NaN = false;
831 static constexpr bool has_signaling_NaN = false;
832 static constexpr float_denorm_style has_denorm = denorm_absent;
833 static constexpr bool has_denorm_loss = false;
835 static constexpr char16_t
836 infinity() noexcept { return char16_t(); }
838 static constexpr char16_t
839 quiet_NaN() noexcept { return char16_t(); }
841 static constexpr char16_t
842 signaling_NaN() noexcept { return char16_t(); }
844 static constexpr char16_t
845 denorm_min() noexcept { return char16_t(); }
847 static constexpr bool is_iec559 = false;
848 static constexpr bool is_bounded = true;
849 static constexpr bool is_modulo = !is_signed;
851 static constexpr bool traps = __glibcxx_integral_traps;
852 static constexpr bool tinyness_before = false;
853 static constexpr float_round_style round_style = round_toward_zero;
856 /// numeric_limits<char32_t> specialization.
858 struct numeric_limits<char32_t>
860 static constexpr bool is_specialized = true;
862 static constexpr char32_t
863 min() noexcept { return __glibcxx_min (char32_t); }
865 static constexpr char32_t
866 max() noexcept { return __glibcxx_max (char32_t); }
868 static constexpr char32_t
869 lowest() noexcept { return min(); }
871 static constexpr int digits = __glibcxx_digits (char32_t);
872 static constexpr int digits10 = __glibcxx_digits10 (char32_t);
873 static constexpr int max_digits10 = 0;
874 static constexpr bool is_signed = __glibcxx_signed (char32_t);
875 static constexpr bool is_integer = true;
876 static constexpr bool is_exact = true;
877 static constexpr int radix = 2;
879 static constexpr char32_t
880 epsilon() noexcept { return 0; }
882 static constexpr char32_t
883 round_error() noexcept { return 0; }
885 static constexpr int min_exponent = 0;
886 static constexpr int min_exponent10 = 0;
887 static constexpr int max_exponent = 0;
888 static constexpr int max_exponent10 = 0;
890 static constexpr bool has_infinity = false;
891 static constexpr bool has_quiet_NaN = false;
892 static constexpr bool has_signaling_NaN = false;
893 static constexpr float_denorm_style has_denorm = denorm_absent;
894 static constexpr bool has_denorm_loss = false;
896 static constexpr char32_t
897 infinity() noexcept { return char32_t(); }
899 static constexpr char32_t
900 quiet_NaN() noexcept { return char32_t(); }
902 static constexpr char32_t
903 signaling_NaN() noexcept { return char32_t(); }
905 static constexpr char32_t
906 denorm_min() noexcept { return char32_t(); }
908 static constexpr bool is_iec559 = false;
909 static constexpr bool is_bounded = true;
910 static constexpr bool is_modulo = !is_signed;
912 static constexpr bool traps = __glibcxx_integral_traps;
913 static constexpr bool tinyness_before = false;
914 static constexpr float_round_style round_style = round_toward_zero;
918 /// numeric_limits<short> specialization.
920 struct numeric_limits<short>
922 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
924 static _GLIBCXX_CONSTEXPR short
925 min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; }
927 static _GLIBCXX_CONSTEXPR short
928 max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; }
930#if __cplusplus >= 201103L
931 static constexpr short
932 lowest() noexcept { return min(); }
935 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (short);
936 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (short);
937#if __cplusplus >= 201103L
938 static constexpr int max_digits10 = 0;
940 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
941 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
942 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
943 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
945 static _GLIBCXX_CONSTEXPR short
946 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
948 static _GLIBCXX_CONSTEXPR short
949 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
951 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
952 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
953 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
954 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
956 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
957 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
958 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
959 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
961 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
963 static _GLIBCXX_CONSTEXPR short
964 infinity() _GLIBCXX_USE_NOEXCEPT { return short(); }
966 static _GLIBCXX_CONSTEXPR short
967 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); }
969 static _GLIBCXX_CONSTEXPR short
970 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); }
972 static _GLIBCXX_CONSTEXPR short
973 denorm_min() _GLIBCXX_USE_NOEXCEPT { return short(); }
975 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
976 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
977 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
979 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
980 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
981 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
985 /// numeric_limits<unsigned short> specialization.
987 struct numeric_limits<unsigned short>
989 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
991 static _GLIBCXX_CONSTEXPR unsigned short
992 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
994 static _GLIBCXX_CONSTEXPR unsigned short
995 max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; }
997#if __cplusplus >= 201103L
998 static constexpr unsigned short
999 lowest() noexcept { return min(); }
1002 static _GLIBCXX_USE_CONSTEXPR int digits
1003 = __glibcxx_digits (unsigned short);
1004 static _GLIBCXX_USE_CONSTEXPR int digits10
1005 = __glibcxx_digits10 (unsigned short);
1006#if __cplusplus >= 201103L
1007 static constexpr int max_digits10 = 0;
1009 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
1010 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1011 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1012 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1014 static _GLIBCXX_CONSTEXPR unsigned short
1015 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1017 static _GLIBCXX_CONSTEXPR unsigned short
1018 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1020 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1021 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1022 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1023 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1025 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1026 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1027 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1028 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1030 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1032 static _GLIBCXX_CONSTEXPR unsigned short
1033 infinity() _GLIBCXX_USE_NOEXCEPT
1034 { return static_cast<unsigned short>(0); }
1036 static _GLIBCXX_CONSTEXPR unsigned short
1037 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
1038 { return static_cast<unsigned short>(0); }
1040 static _GLIBCXX_CONSTEXPR unsigned short
1041 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1042 { return static_cast<unsigned short>(0); }
1044 static _GLIBCXX_CONSTEXPR unsigned short
1045 denorm_min() _GLIBCXX_USE_NOEXCEPT
1046 { return static_cast<unsigned short>(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 = true;
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<int> specialization.
1060 struct numeric_limits<int>
1062 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1064 static _GLIBCXX_CONSTEXPR int
1065 min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; }
1067 static _GLIBCXX_CONSTEXPR int
1068 max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; }
1070#if __cplusplus >= 201103L
1071 static constexpr int
1072 lowest() noexcept { return min(); }
1075 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (int);
1076 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (int);
1077#if __cplusplus >= 201103L
1078 static constexpr int max_digits10 = 0;
1080 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1081 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1082 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1083 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1085 static _GLIBCXX_CONSTEXPR int
1086 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1088 static _GLIBCXX_CONSTEXPR int
1089 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1091 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1092 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1093 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1094 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1096 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1097 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1098 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1099 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1101 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1103 static _GLIBCXX_CONSTEXPR int
1104 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1106 static _GLIBCXX_CONSTEXPR int
1107 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1109 static _GLIBCXX_CONSTEXPR int
1110 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1112 static _GLIBCXX_CONSTEXPR int
1113 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); }
1115 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1116 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1117 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1119 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1120 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1121 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1122 = round_toward_zero;
1125 /// numeric_limits<unsigned int> specialization.
1127 struct numeric_limits<unsigned int>
1129 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1131 static _GLIBCXX_CONSTEXPR unsigned int
1132 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
1134 static _GLIBCXX_CONSTEXPR unsigned int
1135 max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; }
1137#if __cplusplus >= 201103L
1138 static constexpr unsigned int
1139 lowest() noexcept { return min(); }
1142 static _GLIBCXX_USE_CONSTEXPR int digits
1143 = __glibcxx_digits (unsigned int);
1144 static _GLIBCXX_USE_CONSTEXPR int digits10
1145 = __glibcxx_digits10 (unsigned int);
1146#if __cplusplus >= 201103L
1147 static constexpr int max_digits10 = 0;
1149 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
1150 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1151 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1152 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1154 static _GLIBCXX_CONSTEXPR unsigned int
1155 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1157 static _GLIBCXX_CONSTEXPR unsigned int
1158 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1160 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1161 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1162 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1163 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1165 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1166 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1167 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1168 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1170 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1172 static _GLIBCXX_CONSTEXPR unsigned int
1173 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned int>(0); }
1175 static _GLIBCXX_CONSTEXPR unsigned int
1176 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
1177 { return static_cast<unsigned int>(0); }
1179 static _GLIBCXX_CONSTEXPR unsigned int
1180 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1181 { return static_cast<unsigned int>(0); }
1183 static _GLIBCXX_CONSTEXPR unsigned int
1184 denorm_min() _GLIBCXX_USE_NOEXCEPT
1185 { return static_cast<unsigned int>(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 = true;
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<long> specialization.
1199 struct numeric_limits<long>
1201 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1203 static _GLIBCXX_CONSTEXPR long
1204 min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; }
1206 static _GLIBCXX_CONSTEXPR long
1207 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; }
1209#if __cplusplus >= 201103L
1210 static constexpr long
1211 lowest() noexcept { return min(); }
1214 static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long);
1215 static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (long);
1216#if __cplusplus >= 201103L
1217 static constexpr int max_digits10 = 0;
1219 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1220 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1221 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1222 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1224 static _GLIBCXX_CONSTEXPR long
1225 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1227 static _GLIBCXX_CONSTEXPR long
1228 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1230 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1231 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1232 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1233 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1235 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1236 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1237 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1238 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1240 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1242 static _GLIBCXX_CONSTEXPR long
1243 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1245 static _GLIBCXX_CONSTEXPR long
1246 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1248 static _GLIBCXX_CONSTEXPR long
1249 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1251 static _GLIBCXX_CONSTEXPR long
1252 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); }
1254 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1255 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1256 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1258 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1259 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1260 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1261 = round_toward_zero;
1264 /// numeric_limits<unsigned long> specialization.
1266 struct numeric_limits<unsigned long>
1268 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1270 static _GLIBCXX_CONSTEXPR unsigned long
1271 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
1273 static _GLIBCXX_CONSTEXPR unsigned long
1274 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; }
1276#if __cplusplus >= 201103L
1277 static constexpr unsigned long
1278 lowest() noexcept { return min(); }
1281 static _GLIBCXX_USE_CONSTEXPR int digits
1282 = __glibcxx_digits (unsigned long);
1283 static _GLIBCXX_USE_CONSTEXPR int digits10
1284 = __glibcxx_digits10 (unsigned long);
1285#if __cplusplus >= 201103L
1286 static constexpr int max_digits10 = 0;
1288 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
1289 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1290 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1291 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1293 static _GLIBCXX_CONSTEXPR unsigned long
1294 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1296 static _GLIBCXX_CONSTEXPR unsigned long
1297 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1299 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1300 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1301 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1302 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1304 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1305 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1306 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1307 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1309 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1311 static _GLIBCXX_CONSTEXPR unsigned long
1312 infinity() _GLIBCXX_USE_NOEXCEPT
1313 { return static_cast<unsigned long>(0); }
1315 static _GLIBCXX_CONSTEXPR unsigned long
1316 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
1317 { return static_cast<unsigned long>(0); }
1319 static _GLIBCXX_CONSTEXPR unsigned long
1320 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1321 { return static_cast<unsigned long>(0); }
1323 static _GLIBCXX_CONSTEXPR unsigned long
1324 denorm_min() _GLIBCXX_USE_NOEXCEPT
1325 { return static_cast<unsigned long>(0); }
1327 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1328 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1329 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
1331 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1332 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1333 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1334 = round_toward_zero;
1337 /// numeric_limits<long long> specialization.
1339 struct numeric_limits<long long>
1341 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1343 static _GLIBCXX_CONSTEXPR long long
1344 min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; }
1346 static _GLIBCXX_CONSTEXPR long long
1347 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; }
1349#if __cplusplus >= 201103L
1350 static constexpr long long
1351 lowest() noexcept { return min(); }
1354 static _GLIBCXX_USE_CONSTEXPR int digits
1355 = __glibcxx_digits (long long);
1356 static _GLIBCXX_USE_CONSTEXPR int digits10
1357 = __glibcxx_digits10 (long long);
1358#if __cplusplus >= 201103L
1359 static constexpr int max_digits10 = 0;
1361 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1362 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1363 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1364 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1366 static _GLIBCXX_CONSTEXPR long long
1367 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1369 static _GLIBCXX_CONSTEXPR long long
1370 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1372 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1373 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1374 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1375 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1377 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1378 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1379 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1380 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1382 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1384 static _GLIBCXX_CONSTEXPR long long
1385 infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
1387 static _GLIBCXX_CONSTEXPR long long
1388 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
1390 static _GLIBCXX_CONSTEXPR long long
1391 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1392 { return static_cast<long long>(0); }
1394 static _GLIBCXX_CONSTEXPR long long
1395 denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); }
1397 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1398 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1399 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1401 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1402 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1403 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1404 = round_toward_zero;
1407 /// numeric_limits<unsigned long long> specialization.
1409 struct numeric_limits<unsigned long long>
1411 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1413 static _GLIBCXX_CONSTEXPR unsigned long long
1414 min() _GLIBCXX_USE_NOEXCEPT { return 0; }
1416 static _GLIBCXX_CONSTEXPR unsigned long long
1417 max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; }
1419#if __cplusplus >= 201103L
1420 static constexpr unsigned long long
1421 lowest() noexcept { return min(); }
1424 static _GLIBCXX_USE_CONSTEXPR int digits
1425 = __glibcxx_digits (unsigned long long);
1426 static _GLIBCXX_USE_CONSTEXPR int digits10
1427 = __glibcxx_digits10 (unsigned long long);
1428#if __cplusplus >= 201103L
1429 static constexpr int max_digits10 = 0;
1431 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false;
1432 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true;
1433 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true;
1434 static _GLIBCXX_USE_CONSTEXPR int radix = 2;
1436 static _GLIBCXX_CONSTEXPR unsigned long long
1437 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; }
1439 static _GLIBCXX_CONSTEXPR unsigned long long
1440 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; }
1442 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0;
1443 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0;
1444 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0;
1445 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0;
1447 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false;
1448 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false;
1449 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false;
1450 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1452 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false;
1454 static _GLIBCXX_CONSTEXPR unsigned long long
1455 infinity() _GLIBCXX_USE_NOEXCEPT
1456 { return static_cast<unsigned long long>(0); }
1458 static _GLIBCXX_CONSTEXPR unsigned long long
1459 quiet_NaN() _GLIBCXX_USE_NOEXCEPT
1460 { return static_cast<unsigned long long>(0); }
1462 static _GLIBCXX_CONSTEXPR unsigned long long
1463 signaling_NaN() _GLIBCXX_USE_NOEXCEPT
1464 { return static_cast<unsigned long long>(0); }
1466 static _GLIBCXX_CONSTEXPR unsigned long long
1467 denorm_min() _GLIBCXX_USE_NOEXCEPT
1468 { return static_cast<unsigned long long>(0); }
1470 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false;
1471 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1472 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true;
1474 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps;
1475 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false;
1476 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1477 = round_toward_zero;
1480#define __INT_N(TYPE, BITSIZE, EXT, UEXT) \
1482 struct numeric_limits<TYPE> \
1484 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \
1486 static _GLIBCXX_CONSTEXPR TYPE \
1487 min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min_b (TYPE, BITSIZE); } \
1489 static _GLIBCXX_CONSTEXPR TYPE \
1490 max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max_b (TYPE, BITSIZE); } \
1492 static _GLIBCXX_USE_CONSTEXPR int digits \
1494 static _GLIBCXX_USE_CONSTEXPR int digits10 \
1495 = (BITSIZE - 1) * 643L / 2136; \
1497 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; \
1498 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \
1499 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \
1500 static _GLIBCXX_USE_CONSTEXPR int radix = 2; \
1502 static _GLIBCXX_CONSTEXPR TYPE \
1503 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1505 static _GLIBCXX_CONSTEXPR TYPE \
1506 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1510 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; \
1511 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; \
1512 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; \
1513 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; \
1515 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; \
1516 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; \
1517 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; \
1518 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm \
1520 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; \
1522 static _GLIBCXX_CONSTEXPR TYPE \
1523 infinity() _GLIBCXX_USE_NOEXCEPT \
1524 { return static_cast<TYPE>(0); } \
1526 static _GLIBCXX_CONSTEXPR TYPE \
1527 quiet_NaN() _GLIBCXX_USE_NOEXCEPT \
1528 { return static_cast<TYPE>(0); } \
1530 static _GLIBCXX_CONSTEXPR TYPE \
1531 signaling_NaN() _GLIBCXX_USE_NOEXCEPT \
1532 { return static_cast<TYPE>(0); } \
1534 static _GLIBCXX_CONSTEXPR TYPE \
1535 denorm_min() _GLIBCXX_USE_NOEXCEPT \
1536 { return static_cast<TYPE>(0); } \
1538 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; \
1539 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; \
1540 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; \
1542 static _GLIBCXX_USE_CONSTEXPR bool traps \
1543 = __glibcxx_integral_traps; \
1544 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; \
1545 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style \
1546 = round_toward_zero; \
1550 struct numeric_limits<unsigned TYPE> \
1552 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \
1554 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1555 min() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1557 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1558 max() _GLIBCXX_USE_NOEXCEPT \
1559 { return __glibcxx_max_b (unsigned TYPE, BITSIZE); } \
1563 static _GLIBCXX_USE_CONSTEXPR int digits \
1565 static _GLIBCXX_USE_CONSTEXPR int digits10 \
1566 = BITSIZE * 643L / 2136; \
1567 static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; \
1568 static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \
1569 static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \
1570 static _GLIBCXX_USE_CONSTEXPR int radix = 2; \
1572 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1573 epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1575 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1576 round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } \
1578 static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; \
1579 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; \
1580 static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; \
1581 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; \
1583 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; \
1584 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; \
1585 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; \
1586 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm \
1588 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; \
1590 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1591 infinity() _GLIBCXX_USE_NOEXCEPT \
1592 { return static_cast<unsigned TYPE>(0); } \
1594 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1595 quiet_NaN() _GLIBCXX_USE_NOEXCEPT \
1596 { return static_cast<unsigned TYPE>(0); } \
1598 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1599 signaling_NaN() _GLIBCXX_USE_NOEXCEPT \
1600 { return static_cast<unsigned TYPE>(0); } \
1602 static _GLIBCXX_CONSTEXPR unsigned TYPE \
1603 denorm_min() _GLIBCXX_USE_NOEXCEPT \
1604 { return static_cast<unsigned TYPE>(0); } \
1606 static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; \
1607 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; \
1608 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; \
1610 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; \
1611 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; \
1612 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style \
1613 = round_toward_zero; \
1616#if __cplusplus >= 201103L
1618#define __INT_N_201103(TYPE) \
1619 static constexpr TYPE \
1620 lowest() noexcept { return min(); } \
1621 static constexpr int max_digits10 = 0;
1623#define __INT_N_U201103(TYPE) \
1624 static constexpr unsigned TYPE \
1625 lowest() noexcept { return min(); } \
1626 static constexpr int max_digits10 = 0;
1629#define __INT_N_201103(TYPE)
1630#define __INT_N_U201103(TYPE)
1633#if !defined(__STRICT_ANSI__)
1634#ifdef __GLIBCXX_TYPE_INT_N_0
1635 __INT_N(__GLIBCXX_TYPE_INT_N_0, __GLIBCXX_BITSIZE_INT_N_0,
1636 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_0),
1637 __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_0))
1639#ifdef __GLIBCXX_TYPE_INT_N_1
1640 __INT_N (__GLIBCXX_TYPE_INT_N_1, __GLIBCXX_BITSIZE_INT_N_1,
1641 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_1),
1642 __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_1))
1644#ifdef __GLIBCXX_TYPE_INT_N_2
1645 __INT_N (__GLIBCXX_TYPE_INT_N_2, __GLIBCXX_BITSIZE_INT_N_2,
1646 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_2),
1647 __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_2))
1649#ifdef __GLIBCXX_TYPE_INT_N_3
1650 __INT_N (__GLIBCXX_TYPE_INT_N_3, __GLIBCXX_BITSIZE_INT_N_3,
1651 __INT_N_201103 (__GLIBCXX_TYPE_INT_N_3),
1652 __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_3))
1655#elif defined __STRICT_ANSI__ && defined __SIZEOF_INT128__
1656 __INT_N(__int128, 128,
1657 __INT_N_201103 (__int128),
1658 __INT_N_U201103 (__int128))
1662#undef __INT_N_201103
1663#undef __INT_N_U201103
1666 /// numeric_limits<float> specialization.
1668 struct numeric_limits<float>
1670 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1672 static _GLIBCXX_CONSTEXPR float
1673 min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; }
1675 static _GLIBCXX_CONSTEXPR float
1676 max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; }
1678#if __cplusplus >= 201103L
1679 static constexpr float
1680 lowest() noexcept { return -__FLT_MAX__; }
1683 static _GLIBCXX_USE_CONSTEXPR int digits = __FLT_MANT_DIG__;
1684 static _GLIBCXX_USE_CONSTEXPR int digits10 = __FLT_DIG__;
1685#if __cplusplus >= 201103L
1686 static constexpr int max_digits10
1687 = __glibcxx_max_digits10 (__FLT_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 float
1695 epsilon() _GLIBCXX_USE_NOEXCEPT { return __FLT_EPSILON__; }
1697 static _GLIBCXX_CONSTEXPR float
1698 round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5F; }
1700 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __FLT_MIN_EXP__;
1701 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __FLT_MIN_10_EXP__;
1702 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __FLT_MAX_EXP__;
1703 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __FLT_MAX_10_EXP__;
1705 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __FLT_HAS_INFINITY__;
1706 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __FLT_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(__FLT_HAS_DENORM__) ? denorm_present : denorm_absent;
1710 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
1711 = __glibcxx_float_has_denorm_loss;
1713 static _GLIBCXX_CONSTEXPR float
1714 infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_valf(); }
1716 static _GLIBCXX_CONSTEXPR float
1717 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanf(""); }
1719 static _GLIBCXX_CONSTEXPR float
1720 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansf(""); }
1722 static _GLIBCXX_CONSTEXPR float
1723 denorm_min() _GLIBCXX_USE_NOEXCEPT { return __FLT_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_float_traps;
1731 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before
1732 = __glibcxx_float_tinyness_before;
1733 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1737#undef __glibcxx_float_has_denorm_loss
1738#undef __glibcxx_float_traps
1739#undef __glibcxx_float_tinyness_before
1741 /// numeric_limits<double> specialization.
1743 struct numeric_limits<double>
1745 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1747 static _GLIBCXX_CONSTEXPR double
1748 min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; }
1750 static _GLIBCXX_CONSTEXPR double
1751 max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; }
1753#if __cplusplus >= 201103L
1754 static constexpr double
1755 lowest() noexcept { return -__DBL_MAX__; }
1758 static _GLIBCXX_USE_CONSTEXPR int digits = __DBL_MANT_DIG__;
1759 static _GLIBCXX_USE_CONSTEXPR int digits10 = __DBL_DIG__;
1760#if __cplusplus >= 201103L
1761 static constexpr int max_digits10
1762 = __glibcxx_max_digits10 (__DBL_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 double
1770 epsilon() _GLIBCXX_USE_NOEXCEPT { return __DBL_EPSILON__; }
1772 static _GLIBCXX_CONSTEXPR double
1773 round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5; }
1775 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __DBL_MIN_EXP__;
1776 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __DBL_MIN_10_EXP__;
1777 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __DBL_MAX_EXP__;
1778 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __DBL_MAX_10_EXP__;
1780 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __DBL_HAS_INFINITY__;
1781 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __DBL_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(__DBL_HAS_DENORM__) ? denorm_present : denorm_absent;
1785 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
1786 = __glibcxx_double_has_denorm_loss;
1788 static _GLIBCXX_CONSTEXPR double
1789 infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_val(); }
1791 static _GLIBCXX_CONSTEXPR double
1792 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nan(""); }
1794 static _GLIBCXX_CONSTEXPR double
1795 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nans(""); }
1797 static _GLIBCXX_CONSTEXPR double
1798 denorm_min() _GLIBCXX_USE_NOEXCEPT { return __DBL_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_double_traps;
1806 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before
1807 = __glibcxx_double_tinyness_before;
1808 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style
1812#undef __glibcxx_double_has_denorm_loss
1813#undef __glibcxx_double_traps
1814#undef __glibcxx_double_tinyness_before
1816 /// numeric_limits<long double> specialization.
1818 struct numeric_limits<long double>
1820 static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true;
1822 static _GLIBCXX_CONSTEXPR long double
1823 min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; }
1825 static _GLIBCXX_CONSTEXPR long double
1826 max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; }
1828#if __cplusplus >= 201103L
1829 static constexpr long double
1830 lowest() noexcept { return -__LDBL_MAX__; }
1833 static _GLIBCXX_USE_CONSTEXPR int digits = __LDBL_MANT_DIG__;
1834 static _GLIBCXX_USE_CONSTEXPR int digits10 = __LDBL_DIG__;
1835#if __cplusplus >= 201103L
1836 static _GLIBCXX_USE_CONSTEXPR int max_digits10
1837 = __glibcxx_max_digits10 (__LDBL_MANT_DIG__);
1839 static _GLIBCXX_USE_CONSTEXPR bool is_signed = true;
1840 static _GLIBCXX_USE_CONSTEXPR bool is_integer = false;
1841 static _GLIBCXX_USE_CONSTEXPR bool is_exact = false;
1842 static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__;
1844 static _GLIBCXX_CONSTEXPR long double
1845 epsilon() _GLIBCXX_USE_NOEXCEPT { return __LDBL_EPSILON__; }
1847 static _GLIBCXX_CONSTEXPR long double
1848 round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5L; }
1850 static _GLIBCXX_USE_CONSTEXPR int min_exponent = __LDBL_MIN_EXP__;
1851 static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __LDBL_MIN_10_EXP__;
1852 static _GLIBCXX_USE_CONSTEXPR int max_exponent = __LDBL_MAX_EXP__;
1853 static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __LDBL_MAX_10_EXP__;
1855 static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __LDBL_HAS_INFINITY__;
1856 static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__;
1857 static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN;
1858 static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm
1859 = bool(__LDBL_HAS_DENORM__) ? denorm_present : denorm_absent;
1860 static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss
1861 = __glibcxx_long_double_has_denorm_loss;
1863 static _GLIBCXX_CONSTEXPR long double
1864 infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_vall(); }
1866 static _GLIBCXX_CONSTEXPR long double
1867 quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanl(""); }
1869 static _GLIBCXX_CONSTEXPR long double
1870 signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansl(""); }
1872 static _GLIBCXX_CONSTEXPR long double
1873 denorm_min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_DENORM_MIN__; }
1875 static _GLIBCXX_USE_CONSTEXPR bool is_iec559
1876 = has_infinity && has_quiet_NaN && has_denorm == denorm_present;
1877 static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true;
1878 static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false;
1880 static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_long_double_traps;
1881 static _GLIBCXX_USE_CONSTEXPR bool tinyness_before =
1882 __glibcxx_long_double_tinyness_before;
1883 static _GLIBCXX_USE_CONSTEXPR float_round_style round_style =
1887#undef __glibcxx_long_double_has_denorm_loss
1888#undef __glibcxx_long_double_traps
1889#undef __glibcxx_long_double_tinyness_before
1891_GLIBCXX_END_NAMESPACE_VERSION
1894#undef __glibcxx_signed
1897#undef __glibcxx_digits
1898#undef __glibcxx_digits10
1899#undef __glibcxx_max_digits10
1901#endif // _GLIBCXX_NUMERIC_LIMITS