1 1.3 mrg // The template and inlines for the numeric_limits classes. -*- C++ -*- 2 1.1 mrg 3 1.12 mrg // Copyright (C) 1999-2022 Free Software Foundation, Inc. 4 1.1 mrg // 5 1.1 mrg // This file is part of the GNU ISO C++ Library. This library is free 6 1.1 mrg // software; you can redistribute it and/or modify it under the 7 1.1 mrg // terms of the GNU General Public License as published by the 8 1.1 mrg // Free Software Foundation; either version 3, or (at your option) 9 1.1 mrg // any later version. 10 1.1 mrg 11 1.1 mrg // This library is distributed in the hope that it will be useful, 12 1.1 mrg // but WITHOUT ANY WARRANTY; without even the implied warranty of 13 1.1 mrg // MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the 14 1.1 mrg // GNU General Public License for more details. 15 1.1 mrg 16 1.1 mrg // Under Section 7 of GPL version 3, you are granted additional 17 1.1 mrg // permissions described in the GCC Runtime Library Exception, version 18 1.1 mrg // 3.1, as published by the Free Software Foundation. 19 1.1 mrg 20 1.1 mrg // You should have received a copy of the GNU General Public License and 21 1.1 mrg // a copy of the GCC Runtime Library Exception along with this program; 22 1.1 mrg // see the files COPYING3 and COPYING.RUNTIME respectively. If not, see 23 1.1 mrg // <http://www.gnu.org/licenses/>. 24 1.1 mrg 25 1.3 mrg /** @file include/limits 26 1.1 mrg * This is a Standard C++ Library header. 27 1.1 mrg */ 28 1.1 mrg 29 1.1 mrg // Note: this is not a conforming implementation. 30 1.1 mrg // Written by Gabriel Dos Reis <gdr (a] codesourcery.com> 31 1.1 mrg 32 1.1 mrg // 33 1.1 mrg // ISO 14882:1998 34 1.1 mrg // 18.2.1 35 1.1 mrg // 36 1.1 mrg 37 1.1 mrg #ifndef _GLIBCXX_NUMERIC_LIMITS 38 1.1 mrg #define _GLIBCXX_NUMERIC_LIMITS 1 39 1.1 mrg 40 1.1 mrg #pragma GCC system_header 41 1.1 mrg 42 1.1 mrg #include <bits/c++config.h> 43 1.1 mrg 44 1.1 mrg // 45 1.1 mrg // The numeric_limits<> traits document implementation-defined aspects 46 1.1 mrg // of fundamental arithmetic data types (integers and floating points). 47 1.1 mrg // From Standard C++ point of view, there are 14 such types: 48 1.1 mrg // * integers 49 1.3 mrg // bool (1) 50 1.1 mrg // char, signed char, unsigned char, wchar_t (4) 51 1.1 mrg // short, unsigned short (2) 52 1.1 mrg // int, unsigned (2) 53 1.1 mrg // long, unsigned long (2) 54 1.1 mrg // 55 1.1 mrg // * floating points 56 1.1 mrg // float (1) 57 1.1 mrg // double (1) 58 1.1 mrg // long double (1) 59 1.1 mrg // 60 1.1 mrg // GNU C++ understands (where supported by the host C-library) 61 1.1 mrg // * integer 62 1.1 mrg // long long, unsigned long long (2) 63 1.1 mrg // 64 1.1 mrg // which brings us to 16 fundamental arithmetic data types in GNU C++. 65 1.1 mrg // 66 1.1 mrg // 67 1.1 mrg // Since a numeric_limits<> is a bit tricky to get right, we rely on 68 1.1 mrg // an interface composed of macros which should be defined in config/os 69 1.1 mrg // or config/cpu when they differ from the generic (read arbitrary) 70 1.1 mrg // definitions given here. 71 1.1 mrg // 72 1.1 mrg 73 1.1 mrg // These values can be overridden in the target configuration file. 74 1.1 mrg // The default values are appropriate for many 32-bit targets. 75 1.1 mrg 76 1.1 mrg // GCC only intrinsically supports modulo integral types. The only remaining 77 1.1 mrg // integral exceptional values is division by zero. Only targets that do not 78 1.1 mrg // signal division by zero in some "hard to ignore" way should use false. 79 1.1 mrg #ifndef __glibcxx_integral_traps 80 1.1 mrg # define __glibcxx_integral_traps true 81 1.1 mrg #endif 82 1.1 mrg 83 1.1 mrg // float 84 1.1 mrg // 85 1.1 mrg 86 1.1 mrg // Default values. Should be overridden in configuration files if necessary. 87 1.1 mrg 88 1.1 mrg #ifndef __glibcxx_float_has_denorm_loss 89 1.1 mrg # define __glibcxx_float_has_denorm_loss false 90 1.1 mrg #endif 91 1.1 mrg #ifndef __glibcxx_float_traps 92 1.1 mrg # define __glibcxx_float_traps false 93 1.1 mrg #endif 94 1.1 mrg #ifndef __glibcxx_float_tinyness_before 95 1.1 mrg # define __glibcxx_float_tinyness_before false 96 1.1 mrg #endif 97 1.1 mrg 98 1.1 mrg // double 99 1.1 mrg 100 1.1 mrg // Default values. Should be overridden in configuration files if necessary. 101 1.1 mrg 102 1.1 mrg #ifndef __glibcxx_double_has_denorm_loss 103 1.1 mrg # define __glibcxx_double_has_denorm_loss false 104 1.1 mrg #endif 105 1.1 mrg #ifndef __glibcxx_double_traps 106 1.1 mrg # define __glibcxx_double_traps false 107 1.1 mrg #endif 108 1.1 mrg #ifndef __glibcxx_double_tinyness_before 109 1.1 mrg # define __glibcxx_double_tinyness_before false 110 1.1 mrg #endif 111 1.1 mrg 112 1.1 mrg // long double 113 1.1 mrg 114 1.1 mrg // Default values. Should be overridden in configuration files if necessary. 115 1.1 mrg 116 1.1 mrg #ifndef __glibcxx_long_double_has_denorm_loss 117 1.1 mrg # define __glibcxx_long_double_has_denorm_loss false 118 1.1 mrg #endif 119 1.1 mrg #ifndef __glibcxx_long_double_traps 120 1.1 mrg # define __glibcxx_long_double_traps false 121 1.1 mrg #endif 122 1.1 mrg #ifndef __glibcxx_long_double_tinyness_before 123 1.1 mrg # define __glibcxx_long_double_tinyness_before false 124 1.1 mrg #endif 125 1.1 mrg 126 1.1 mrg // You should not need to define any macros below this point. 127 1.1 mrg 128 1.5 mrg #define __glibcxx_signed_b(T,B) ((T)(-1) < 0) 129 1.1 mrg 130 1.5 mrg #define __glibcxx_min_b(T,B) \ 131 1.5 mrg (__glibcxx_signed_b (T,B) ? -__glibcxx_max_b (T,B) - 1 : (T)0) 132 1.1 mrg 133 1.5 mrg #define __glibcxx_max_b(T,B) \ 134 1.5 mrg (__glibcxx_signed_b (T,B) ? \ 135 1.5 mrg (((((T)1 << (__glibcxx_digits_b (T,B) - 1)) - 1) << 1) + 1) : ~(T)0) 136 1.1 mrg 137 1.5 mrg #define __glibcxx_digits_b(T,B) \ 138 1.5 mrg (B - __glibcxx_signed_b (T,B)) 139 1.1 mrg 140 1.1 mrg // The fraction 643/2136 approximates log10(2) to 7 significant digits. 141 1.5 mrg #define __glibcxx_digits10_b(T,B) \ 142 1.5 mrg (__glibcxx_digits_b (T,B) * 643L / 2136) 143 1.5 mrg 144 1.5 mrg #define __glibcxx_signed(T) \ 145 1.5 mrg __glibcxx_signed_b (T, sizeof(T) * __CHAR_BIT__) 146 1.5 mrg #define __glibcxx_min(T) \ 147 1.5 mrg __glibcxx_min_b (T, sizeof(T) * __CHAR_BIT__) 148 1.5 mrg #define __glibcxx_max(T) \ 149 1.5 mrg __glibcxx_max_b (T, sizeof(T) * __CHAR_BIT__) 150 1.5 mrg #define __glibcxx_digits(T) \ 151 1.5 mrg __glibcxx_digits_b (T, sizeof(T) * __CHAR_BIT__) 152 1.1 mrg #define __glibcxx_digits10(T) \ 153 1.5 mrg __glibcxx_digits10_b (T, sizeof(T) * __CHAR_BIT__) 154 1.1 mrg 155 1.1 mrg #define __glibcxx_max_digits10(T) \ 156 1.3 mrg (2 + (T) * 643L / 2136) 157 1.1 mrg 158 1.3 mrg namespace std _GLIBCXX_VISIBILITY(default) 159 1.3 mrg { 160 1.3 mrg _GLIBCXX_BEGIN_NAMESPACE_VERSION 161 1.1 mrg 162 1.1 mrg /** 163 1.1 mrg * @brief Describes the rounding style for floating-point types. 164 1.1 mrg * 165 1.1 mrg * This is used in the std::numeric_limits class. 166 1.1 mrg */ 167 1.1 mrg enum float_round_style 168 1.1 mrg { 169 1.3 mrg round_indeterminate = -1, /// Intermediate. 170 1.3 mrg round_toward_zero = 0, /// To zero. 171 1.3 mrg round_to_nearest = 1, /// To the nearest representable value. 172 1.3 mrg round_toward_infinity = 2, /// To infinity. 173 1.3 mrg round_toward_neg_infinity = 3 /// To negative infinity. 174 1.1 mrg }; 175 1.1 mrg 176 1.1 mrg /** 177 1.1 mrg * @brief Describes the denormalization for floating-point types. 178 1.1 mrg * 179 1.1 mrg * These values represent the presence or absence of a variable number 180 1.1 mrg * of exponent bits. This type is used in the std::numeric_limits class. 181 1.1 mrg */ 182 1.1 mrg enum float_denorm_style 183 1.1 mrg { 184 1.1 mrg /// Indeterminate at compile time whether denormalized values are allowed. 185 1.1 mrg denorm_indeterminate = -1, 186 1.1 mrg /// The type does not allow denormalized values. 187 1.1 mrg denorm_absent = 0, 188 1.1 mrg /// The type allows denormalized values. 189 1.1 mrg denorm_present = 1 190 1.1 mrg }; 191 1.1 mrg 192 1.1 mrg /** 193 1.1 mrg * @brief Part of std::numeric_limits. 194 1.1 mrg * 195 1.1 mrg * The @c static @c const members are usable as integral constant 196 1.1 mrg * expressions. 197 1.1 mrg * 198 1.1 mrg * @note This is a separate class for purposes of efficiency; you 199 1.1 mrg * should only access these members as part of an instantiation 200 1.1 mrg * of the std::numeric_limits class. 201 1.1 mrg */ 202 1.1 mrg struct __numeric_limits_base 203 1.1 mrg { 204 1.1 mrg /** This will be true for all fundamental types (which have 205 1.3 mrg specializations), and false for everything else. */ 206 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = false; 207 1.1 mrg 208 1.1 mrg /** The number of @c radix digits that be represented without change: for 209 1.3 mrg integer types, the number of non-sign bits in the mantissa; for 210 1.3 mrg floating types, the number of @c radix digits in the mantissa. */ 211 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = 0; 212 1.3 mrg 213 1.1 mrg /** The number of base 10 digits that can be represented without change. */ 214 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 = 0; 215 1.3 mrg 216 1.3 mrg #if __cplusplus >= 201103L 217 1.1 mrg /** The number of base 10 digits required to ensure that values which 218 1.1 mrg differ are always differentiated. */ 219 1.3 mrg static constexpr int max_digits10 = 0; 220 1.1 mrg #endif 221 1.3 mrg 222 1.1 mrg /** True if the type is signed. */ 223 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; 224 1.3 mrg 225 1.3 mrg /** True if the type is integer. */ 226 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = false; 227 1.3 mrg 228 1.3 mrg /** True if the type uses an exact representation. All integer types are 229 1.3 mrg exact, but not all exact types are integer. For example, rational and 230 1.3 mrg fixed-exponent representations are exact but not integer. */ 231 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; 232 1.3 mrg 233 1.1 mrg /** For integer types, specifies the base of the representation. For 234 1.3 mrg floating types, specifies the base of the exponent representation. */ 235 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 0; 236 1.1 mrg 237 1.1 mrg /** The minimum negative integer such that @c radix raised to the power of 238 1.3 mrg (one less than that integer) is a normalized floating point number. */ 239 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 240 1.3 mrg 241 1.1 mrg /** The minimum negative integer such that 10 raised to that power is in 242 1.3 mrg the range of normalized floating point numbers. */ 243 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 244 1.3 mrg 245 1.1 mrg /** The maximum positive integer such that @c radix raised to the power of 246 1.3 mrg (one less than that integer) is a representable finite floating point 247 1.1 mrg number. */ 248 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 249 1.3 mrg 250 1.1 mrg /** The maximum positive integer such that 10 raised to that power is in 251 1.3 mrg the range of representable finite floating point numbers. */ 252 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 253 1.1 mrg 254 1.1 mrg /** True if the type has a representation for positive infinity. */ 255 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 256 1.3 mrg 257 1.1 mrg /** True if the type has a representation for a quiet (non-signaling) 258 1.3 mrg Not a Number. */ 259 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 260 1.3 mrg 261 1.1 mrg /** True if the type has a representation for a signaling 262 1.3 mrg Not a Number. */ 263 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 264 1.3 mrg 265 1.1 mrg /** See std::float_denorm_style for more information. */ 266 1.3 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm = denorm_absent; 267 1.3 mrg 268 1.3 mrg /** True if loss of accuracy is detected as a denormalization loss, 269 1.3 mrg rather than as an inexact result. */ 270 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 271 1.1 mrg 272 1.1 mrg /** True if-and-only-if the type adheres to the IEC 559 standard, also 273 1.3 mrg known as IEEE 754. (Only makes sense for floating point types.) */ 274 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 275 1.3 mrg 276 1.3 mrg /** True if the set of values representable by the type is 277 1.3 mrg finite. All built-in types are bounded, this member would be 278 1.3 mrg false for arbitrary precision types. */ 279 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = false; 280 1.3 mrg 281 1.3 mrg /** True if the type is @e modulo. A type is modulo if, for any 282 1.3 mrg operation involving +, -, or * on values of that type whose 283 1.3 mrg result would fall outside the range [min(),max()], the value 284 1.3 mrg returned differs from the true value by an integer multiple of 285 1.3 mrg max() - min() + 1. On most machines, this is false for floating 286 1.3 mrg types, true for unsigned integers, and true for signed integers. 287 1.3 mrg See PR22200 about signed integers. */ 288 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; 289 1.1 mrg 290 1.1 mrg /** True if trapping is implemented for this type. */ 291 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = false; 292 1.3 mrg 293 1.1 mrg /** True if tininess is detected before rounding. (see IEC 559) */ 294 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 295 1.3 mrg 296 1.1 mrg /** See std::float_round_style for more information. This is only 297 1.3 mrg meaningful for floating types; integer types will all be 298 1.1 mrg round_toward_zero. */ 299 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = 300 1.3 mrg round_toward_zero; 301 1.1 mrg }; 302 1.1 mrg 303 1.1 mrg /** 304 1.1 mrg * @brief Properties of fundamental types. 305 1.1 mrg * 306 1.1 mrg * This class allows a program to obtain information about the 307 1.1 mrg * representation of a fundamental type on a given platform. For 308 1.1 mrg * non-fundamental types, the functions will return 0 and the data 309 1.1 mrg * members will all be @c false. 310 1.1 mrg */ 311 1.1 mrg template<typename _Tp> 312 1.1 mrg struct numeric_limits : public __numeric_limits_base 313 1.1 mrg { 314 1.1 mrg /** The minimum finite value, or for floating types with 315 1.3 mrg denormalization, the minimum positive normalized value. */ 316 1.3 mrg static _GLIBCXX_CONSTEXPR _Tp 317 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } 318 1.3 mrg 319 1.1 mrg /** The maximum finite value. */ 320 1.3 mrg static _GLIBCXX_CONSTEXPR _Tp 321 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } 322 1.3 mrg 323 1.3 mrg #if __cplusplus >= 201103L 324 1.1 mrg /** A finite value x such that there is no other finite value y 325 1.1 mrg * where y < x. */ 326 1.3 mrg static constexpr _Tp 327 1.3 mrg lowest() noexcept { return _Tp(); } 328 1.1 mrg #endif 329 1.3 mrg 330 1.1 mrg /** The @e machine @e epsilon: the difference between 1 and the least 331 1.3 mrg value greater than 1 that is representable. */ 332 1.3 mrg static _GLIBCXX_CONSTEXPR _Tp 333 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } 334 1.3 mrg 335 1.1 mrg /** The maximum rounding error measurement (see LIA-1). */ 336 1.3 mrg static _GLIBCXX_CONSTEXPR _Tp 337 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } 338 1.3 mrg 339 1.1 mrg /** The representation of positive infinity, if @c has_infinity. */ 340 1.3 mrg static _GLIBCXX_CONSTEXPR _Tp 341 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } 342 1.1 mrg 343 1.3 mrg /** The representation of a quiet Not a Number, 344 1.1 mrg if @c has_quiet_NaN. */ 345 1.3 mrg static _GLIBCXX_CONSTEXPR _Tp 346 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } 347 1.3 mrg 348 1.3 mrg /** The representation of a signaling Not a Number, if 349 1.3 mrg @c has_signaling_NaN. */ 350 1.3 mrg static _GLIBCXX_CONSTEXPR _Tp 351 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } 352 1.3 mrg 353 1.1 mrg /** The minimum positive denormalized value. For types where 354 1.3 mrg @c has_denorm is false, this is the minimum positive normalized 355 1.1 mrg value. */ 356 1.3 mrg static _GLIBCXX_CONSTEXPR _Tp 357 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return _Tp(); } 358 1.1 mrg }; 359 1.1 mrg 360 1.8 mrg // _GLIBCXX_RESOLVE_LIB_DEFECTS 361 1.8 mrg // 559. numeric_limits<const T> 362 1.8 mrg 363 1.1 mrg template<typename _Tp> 364 1.1 mrg struct numeric_limits<const _Tp> 365 1.1 mrg : public numeric_limits<_Tp> { }; 366 1.1 mrg 367 1.1 mrg template<typename _Tp> 368 1.1 mrg struct numeric_limits<volatile _Tp> 369 1.1 mrg : public numeric_limits<_Tp> { }; 370 1.1 mrg 371 1.1 mrg template<typename _Tp> 372 1.1 mrg struct numeric_limits<const volatile _Tp> 373 1.1 mrg : public numeric_limits<_Tp> { }; 374 1.1 mrg 375 1.1 mrg // Now there follow 16 explicit specializations. Yes, 16. Make sure 376 1.8 mrg // you get the count right. (18 in C++11 mode, with char16_t and char32_t.) 377 1.10 mrg // (+1 if char8_t is enabled.) 378 1.8 mrg 379 1.8 mrg // _GLIBCXX_RESOLVE_LIB_DEFECTS 380 1.8 mrg // 184. numeric_limits<bool> wording problems 381 1.1 mrg 382 1.1 mrg /// numeric_limits<bool> specialization. 383 1.1 mrg template<> 384 1.1 mrg struct numeric_limits<bool> 385 1.1 mrg { 386 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 387 1.3 mrg 388 1.8 mrg static _GLIBCXX_CONSTEXPR bool 389 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return false; } 390 1.3 mrg 391 1.8 mrg static _GLIBCXX_CONSTEXPR bool 392 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return true; } 393 1.3 mrg 394 1.3 mrg #if __cplusplus >= 201103L 395 1.3 mrg static constexpr bool 396 1.3 mrg lowest() noexcept { return min(); } 397 1.3 mrg #endif 398 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = 1; 399 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 = 0; 400 1.3 mrg #if __cplusplus >= 201103L 401 1.3 mrg static constexpr int max_digits10 = 0; 402 1.3 mrg #endif 403 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; 404 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 405 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 406 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 407 1.1 mrg 408 1.8 mrg static _GLIBCXX_CONSTEXPR bool 409 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return false; } 410 1.3 mrg 411 1.8 mrg static _GLIBCXX_CONSTEXPR bool 412 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return false; } 413 1.3 mrg 414 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 415 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 416 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 417 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 418 1.3 mrg 419 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 420 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 421 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 422 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 423 1.3 mrg = denorm_absent; 424 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 425 1.3 mrg 426 1.8 mrg static _GLIBCXX_CONSTEXPR bool 427 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return false; } 428 1.3 mrg 429 1.8 mrg static _GLIBCXX_CONSTEXPR bool 430 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return false; } 431 1.3 mrg 432 1.8 mrg static _GLIBCXX_CONSTEXPR bool 433 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return false; } 434 1.3 mrg 435 1.8 mrg static _GLIBCXX_CONSTEXPR bool 436 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return false; } 437 1.3 mrg 438 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 439 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 440 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; 441 1.1 mrg 442 1.1 mrg // It is not clear what it means for a boolean type to trap. 443 1.1 mrg // This is a DR on the LWG issue list. Here, I use integer 444 1.1 mrg // promotion semantics. 445 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 446 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 447 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 448 1.3 mrg = round_toward_zero; 449 1.1 mrg }; 450 1.1 mrg 451 1.1 mrg /// numeric_limits<char> specialization. 452 1.1 mrg template<> 453 1.1 mrg struct numeric_limits<char> 454 1.1 mrg { 455 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 456 1.3 mrg 457 1.8 mrg static _GLIBCXX_CONSTEXPR char 458 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min(char); } 459 1.3 mrg 460 1.8 mrg static _GLIBCXX_CONSTEXPR char 461 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max(char); } 462 1.3 mrg 463 1.3 mrg #if __cplusplus >= 201103L 464 1.8 mrg static constexpr char 465 1.3 mrg lowest() noexcept { return min(); } 466 1.3 mrg #endif 467 1.3 mrg 468 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char); 469 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char); 470 1.3 mrg #if __cplusplus >= 201103L 471 1.3 mrg static constexpr int max_digits10 = 0; 472 1.3 mrg #endif 473 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char); 474 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 475 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 476 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 477 1.1 mrg 478 1.8 mrg static _GLIBCXX_CONSTEXPR char 479 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 480 1.3 mrg 481 1.8 mrg static _GLIBCXX_CONSTEXPR char 482 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 483 1.3 mrg 484 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 485 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 486 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 487 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 488 1.3 mrg 489 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 490 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 491 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 492 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 493 1.3 mrg = denorm_absent; 494 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 495 1.3 mrg 496 1.8 mrg static _GLIBCXX_CONSTEXPR 497 1.3 mrg char infinity() _GLIBCXX_USE_NOEXCEPT { return char(); } 498 1.3 mrg 499 1.8 mrg static _GLIBCXX_CONSTEXPR char 500 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); } 501 1.3 mrg 502 1.8 mrg static _GLIBCXX_CONSTEXPR char 503 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char(); } 504 1.3 mrg 505 1.8 mrg static _GLIBCXX_CONSTEXPR char 506 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<char>(0); } 507 1.3 mrg 508 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 509 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 510 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed; 511 1.3 mrg 512 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 513 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 514 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 515 1.3 mrg = round_toward_zero; 516 1.1 mrg }; 517 1.1 mrg 518 1.1 mrg /// numeric_limits<signed char> specialization. 519 1.1 mrg template<> 520 1.1 mrg struct numeric_limits<signed char> 521 1.1 mrg { 522 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 523 1.3 mrg 524 1.8 mrg static _GLIBCXX_CONSTEXPR signed char 525 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return -__SCHAR_MAX__ - 1; } 526 1.3 mrg 527 1.8 mrg static _GLIBCXX_CONSTEXPR signed char 528 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__; } 529 1.1 mrg 530 1.3 mrg #if __cplusplus >= 201103L 531 1.8 mrg static constexpr signed char 532 1.3 mrg lowest() noexcept { return min(); } 533 1.3 mrg #endif 534 1.3 mrg 535 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (signed char); 536 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 537 1.3 mrg = __glibcxx_digits10 (signed char); 538 1.3 mrg #if __cplusplus >= 201103L 539 1.3 mrg static constexpr int max_digits10 = 0; 540 1.3 mrg #endif 541 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; 542 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 543 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 544 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 545 1.1 mrg 546 1.8 mrg static _GLIBCXX_CONSTEXPR signed char 547 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 548 1.3 mrg 549 1.8 mrg static _GLIBCXX_CONSTEXPR signed char 550 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 551 1.3 mrg 552 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 553 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 554 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 555 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 556 1.3 mrg 557 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 558 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 559 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 560 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 561 1.3 mrg = denorm_absent; 562 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 563 1.3 mrg 564 1.8 mrg static _GLIBCXX_CONSTEXPR signed char 565 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); } 566 1.3 mrg 567 1.8 mrg static _GLIBCXX_CONSTEXPR signed char 568 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<signed char>(0); } 569 1.3 mrg 570 1.8 mrg static _GLIBCXX_CONSTEXPR signed char 571 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT 572 1.1 mrg { return static_cast<signed char>(0); } 573 1.3 mrg 574 1.8 mrg static _GLIBCXX_CONSTEXPR signed char 575 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT 576 1.1 mrg { return static_cast<signed char>(0); } 577 1.1 mrg 578 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 579 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 580 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; 581 1.3 mrg 582 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 583 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 584 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 585 1.3 mrg = round_toward_zero; 586 1.1 mrg }; 587 1.1 mrg 588 1.1 mrg /// numeric_limits<unsigned char> specialization. 589 1.1 mrg template<> 590 1.1 mrg struct numeric_limits<unsigned char> 591 1.1 mrg { 592 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 593 1.3 mrg 594 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned char 595 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return 0; } 596 1.3 mrg 597 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned char 598 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __SCHAR_MAX__ * 2U + 1; } 599 1.1 mrg 600 1.3 mrg #if __cplusplus >= 201103L 601 1.8 mrg static constexpr unsigned char 602 1.3 mrg lowest() noexcept { return min(); } 603 1.3 mrg #endif 604 1.3 mrg 605 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits 606 1.3 mrg = __glibcxx_digits (unsigned char); 607 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 608 1.3 mrg = __glibcxx_digits10 (unsigned char); 609 1.3 mrg #if __cplusplus >= 201103L 610 1.3 mrg static constexpr int max_digits10 = 0; 611 1.3 mrg #endif 612 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; 613 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 614 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 615 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 616 1.3 mrg 617 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned char 618 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 619 1.3 mrg 620 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned char 621 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 622 1.3 mrg 623 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 624 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 625 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 626 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 627 1.3 mrg 628 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 629 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 630 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 631 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 632 1.3 mrg = denorm_absent; 633 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 634 1.1 mrg 635 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned char 636 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT 637 1.1 mrg { return static_cast<unsigned char>(0); } 638 1.3 mrg 639 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned char 640 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT 641 1.1 mrg { return static_cast<unsigned char>(0); } 642 1.3 mrg 643 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned char 644 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT 645 1.1 mrg { return static_cast<unsigned char>(0); } 646 1.3 mrg 647 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned char 648 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT 649 1.1 mrg { return static_cast<unsigned char>(0); } 650 1.1 mrg 651 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 652 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 653 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; 654 1.3 mrg 655 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 656 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 657 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 658 1.3 mrg = round_toward_zero; 659 1.1 mrg }; 660 1.1 mrg 661 1.1 mrg /// numeric_limits<wchar_t> specialization. 662 1.1 mrg template<> 663 1.1 mrg struct numeric_limits<wchar_t> 664 1.1 mrg { 665 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 666 1.3 mrg 667 1.8 mrg static _GLIBCXX_CONSTEXPR wchar_t 668 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (wchar_t); } 669 1.3 mrg 670 1.8 mrg static _GLIBCXX_CONSTEXPR wchar_t 671 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (wchar_t); } 672 1.3 mrg 673 1.3 mrg #if __cplusplus >= 201103L 674 1.3 mrg static constexpr wchar_t 675 1.3 mrg lowest() noexcept { return min(); } 676 1.3 mrg #endif 677 1.3 mrg 678 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (wchar_t); 679 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 680 1.3 mrg = __glibcxx_digits10 (wchar_t); 681 1.3 mrg #if __cplusplus >= 201103L 682 1.3 mrg static constexpr int max_digits10 = 0; 683 1.3 mrg #endif 684 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (wchar_t); 685 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 686 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 687 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 688 1.3 mrg 689 1.8 mrg static _GLIBCXX_CONSTEXPR wchar_t 690 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 691 1.3 mrg 692 1.8 mrg static _GLIBCXX_CONSTEXPR wchar_t 693 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 694 1.3 mrg 695 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 696 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 697 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 698 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 699 1.3 mrg 700 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 701 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 702 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 703 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 704 1.3 mrg = denorm_absent; 705 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 706 1.3 mrg 707 1.8 mrg static _GLIBCXX_CONSTEXPR wchar_t 708 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } 709 1.3 mrg 710 1.8 mrg static _GLIBCXX_CONSTEXPR wchar_t 711 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } 712 1.3 mrg 713 1.8 mrg static _GLIBCXX_CONSTEXPR wchar_t 714 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } 715 1.3 mrg 716 1.8 mrg static _GLIBCXX_CONSTEXPR wchar_t 717 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return wchar_t(); } 718 1.1 mrg 719 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 720 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 721 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed; 722 1.3 mrg 723 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 724 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 725 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 726 1.3 mrg = round_toward_zero; 727 1.1 mrg }; 728 1.1 mrg 729 1.10 mrg #if _GLIBCXX_USE_CHAR8_T 730 1.10 mrg /// numeric_limits<char8_t> specialization. 731 1.10 mrg template<> 732 1.10 mrg struct numeric_limits<char8_t> 733 1.10 mrg { 734 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 735 1.10 mrg 736 1.10 mrg static _GLIBCXX_CONSTEXPR char8_t 737 1.10 mrg min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min (char8_t); } 738 1.10 mrg 739 1.10 mrg static _GLIBCXX_CONSTEXPR char8_t 740 1.10 mrg max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max (char8_t); } 741 1.10 mrg 742 1.10 mrg static _GLIBCXX_CONSTEXPR char8_t 743 1.10 mrg lowest() _GLIBCXX_USE_NOEXCEPT { return min(); } 744 1.10 mrg 745 1.10 mrg static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (char8_t); 746 1.10 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (char8_t); 747 1.10 mrg static _GLIBCXX_USE_CONSTEXPR int max_digits10 = 0; 748 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = __glibcxx_signed (char8_t); 749 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 750 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 751 1.10 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 752 1.10 mrg 753 1.10 mrg static _GLIBCXX_CONSTEXPR char8_t 754 1.10 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 755 1.10 mrg 756 1.10 mrg static _GLIBCXX_CONSTEXPR char8_t 757 1.10 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 758 1.10 mrg 759 1.10 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 760 1.10 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 761 1.10 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 762 1.10 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 763 1.10 mrg 764 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 765 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 766 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 767 1.10 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 768 1.10 mrg = denorm_absent; 769 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 770 1.10 mrg 771 1.10 mrg static _GLIBCXX_CONSTEXPR char8_t 772 1.10 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return char8_t(); } 773 1.10 mrg 774 1.10 mrg static _GLIBCXX_CONSTEXPR char8_t 775 1.10 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return char8_t(); } 776 1.10 mrg 777 1.10 mrg static _GLIBCXX_CONSTEXPR char8_t 778 1.10 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return char8_t(); } 779 1.10 mrg 780 1.10 mrg static _GLIBCXX_CONSTEXPR char8_t 781 1.10 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return char8_t(); } 782 1.10 mrg 783 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 784 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 785 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = !is_signed; 786 1.10 mrg 787 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 788 1.10 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 789 1.10 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 790 1.10 mrg = round_toward_zero; 791 1.10 mrg }; 792 1.10 mrg #endif 793 1.10 mrg 794 1.3 mrg #if __cplusplus >= 201103L 795 1.1 mrg /// numeric_limits<char16_t> specialization. 796 1.1 mrg template<> 797 1.1 mrg struct numeric_limits<char16_t> 798 1.1 mrg { 799 1.3 mrg static constexpr bool is_specialized = true; 800 1.3 mrg 801 1.8 mrg static constexpr char16_t 802 1.3 mrg min() noexcept { return __glibcxx_min (char16_t); } 803 1.3 mrg 804 1.8 mrg static constexpr char16_t 805 1.3 mrg max() noexcept { return __glibcxx_max (char16_t); } 806 1.3 mrg 807 1.8 mrg static constexpr char16_t 808 1.3 mrg lowest() noexcept { return min(); } 809 1.3 mrg 810 1.3 mrg static constexpr int digits = __glibcxx_digits (char16_t); 811 1.3 mrg static constexpr int digits10 = __glibcxx_digits10 (char16_t); 812 1.3 mrg static constexpr int max_digits10 = 0; 813 1.3 mrg static constexpr bool is_signed = __glibcxx_signed (char16_t); 814 1.3 mrg static constexpr bool is_integer = true; 815 1.3 mrg static constexpr bool is_exact = true; 816 1.3 mrg static constexpr int radix = 2; 817 1.3 mrg 818 1.8 mrg static constexpr char16_t 819 1.3 mrg epsilon() noexcept { return 0; } 820 1.3 mrg 821 1.8 mrg static constexpr char16_t 822 1.3 mrg round_error() noexcept { return 0; } 823 1.3 mrg 824 1.3 mrg static constexpr int min_exponent = 0; 825 1.3 mrg static constexpr int min_exponent10 = 0; 826 1.3 mrg static constexpr int max_exponent = 0; 827 1.3 mrg static constexpr int max_exponent10 = 0; 828 1.3 mrg 829 1.3 mrg static constexpr bool has_infinity = false; 830 1.3 mrg static constexpr bool has_quiet_NaN = false; 831 1.3 mrg static constexpr bool has_signaling_NaN = false; 832 1.3 mrg static constexpr float_denorm_style has_denorm = denorm_absent; 833 1.3 mrg static constexpr bool has_denorm_loss = false; 834 1.3 mrg 835 1.8 mrg static constexpr char16_t 836 1.3 mrg infinity() noexcept { return char16_t(); } 837 1.3 mrg 838 1.8 mrg static constexpr char16_t 839 1.3 mrg quiet_NaN() noexcept { return char16_t(); } 840 1.3 mrg 841 1.8 mrg static constexpr char16_t 842 1.3 mrg signaling_NaN() noexcept { return char16_t(); } 843 1.3 mrg 844 1.8 mrg static constexpr char16_t 845 1.3 mrg denorm_min() noexcept { return char16_t(); } 846 1.3 mrg 847 1.3 mrg static constexpr bool is_iec559 = false; 848 1.3 mrg static constexpr bool is_bounded = true; 849 1.3 mrg static constexpr bool is_modulo = !is_signed; 850 1.1 mrg 851 1.3 mrg static constexpr bool traps = __glibcxx_integral_traps; 852 1.3 mrg static constexpr bool tinyness_before = false; 853 1.3 mrg static constexpr float_round_style round_style = round_toward_zero; 854 1.1 mrg }; 855 1.1 mrg 856 1.1 mrg /// numeric_limits<char32_t> specialization. 857 1.1 mrg template<> 858 1.1 mrg struct numeric_limits<char32_t> 859 1.1 mrg { 860 1.3 mrg static constexpr bool is_specialized = true; 861 1.3 mrg 862 1.8 mrg static constexpr char32_t 863 1.3 mrg min() noexcept { return __glibcxx_min (char32_t); } 864 1.3 mrg 865 1.8 mrg static constexpr char32_t 866 1.3 mrg max() noexcept { return __glibcxx_max (char32_t); } 867 1.3 mrg 868 1.8 mrg static constexpr char32_t 869 1.3 mrg lowest() noexcept { return min(); } 870 1.3 mrg 871 1.3 mrg static constexpr int digits = __glibcxx_digits (char32_t); 872 1.3 mrg static constexpr int digits10 = __glibcxx_digits10 (char32_t); 873 1.3 mrg static constexpr int max_digits10 = 0; 874 1.3 mrg static constexpr bool is_signed = __glibcxx_signed (char32_t); 875 1.3 mrg static constexpr bool is_integer = true; 876 1.3 mrg static constexpr bool is_exact = true; 877 1.3 mrg static constexpr int radix = 2; 878 1.3 mrg 879 1.8 mrg static constexpr char32_t 880 1.3 mrg epsilon() noexcept { return 0; } 881 1.3 mrg 882 1.8 mrg static constexpr char32_t 883 1.3 mrg round_error() noexcept { return 0; } 884 1.3 mrg 885 1.3 mrg static constexpr int min_exponent = 0; 886 1.3 mrg static constexpr int min_exponent10 = 0; 887 1.3 mrg static constexpr int max_exponent = 0; 888 1.3 mrg static constexpr int max_exponent10 = 0; 889 1.3 mrg 890 1.3 mrg static constexpr bool has_infinity = false; 891 1.3 mrg static constexpr bool has_quiet_NaN = false; 892 1.3 mrg static constexpr bool has_signaling_NaN = false; 893 1.3 mrg static constexpr float_denorm_style has_denorm = denorm_absent; 894 1.3 mrg static constexpr bool has_denorm_loss = false; 895 1.3 mrg 896 1.8 mrg static constexpr char32_t 897 1.3 mrg infinity() noexcept { return char32_t(); } 898 1.3 mrg 899 1.8 mrg static constexpr char32_t 900 1.3 mrg quiet_NaN() noexcept { return char32_t(); } 901 1.3 mrg 902 1.8 mrg static constexpr char32_t 903 1.3 mrg signaling_NaN() noexcept { return char32_t(); } 904 1.3 mrg 905 1.8 mrg static constexpr char32_t 906 1.3 mrg denorm_min() noexcept { return char32_t(); } 907 1.3 mrg 908 1.3 mrg static constexpr bool is_iec559 = false; 909 1.3 mrg static constexpr bool is_bounded = true; 910 1.3 mrg static constexpr bool is_modulo = !is_signed; 911 1.1 mrg 912 1.3 mrg static constexpr bool traps = __glibcxx_integral_traps; 913 1.3 mrg static constexpr bool tinyness_before = false; 914 1.3 mrg static constexpr float_round_style round_style = round_toward_zero; 915 1.1 mrg }; 916 1.1 mrg #endif 917 1.1 mrg 918 1.1 mrg /// numeric_limits<short> specialization. 919 1.1 mrg template<> 920 1.1 mrg struct numeric_limits<short> 921 1.1 mrg { 922 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 923 1.1 mrg 924 1.8 mrg static _GLIBCXX_CONSTEXPR short 925 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return -__SHRT_MAX__ - 1; } 926 1.3 mrg 927 1.8 mrg static _GLIBCXX_CONSTEXPR short 928 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__; } 929 1.3 mrg 930 1.3 mrg #if __cplusplus >= 201103L 931 1.8 mrg static constexpr short 932 1.3 mrg lowest() noexcept { return min(); } 933 1.3 mrg #endif 934 1.3 mrg 935 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (short); 936 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (short); 937 1.3 mrg #if __cplusplus >= 201103L 938 1.3 mrg static constexpr int max_digits10 = 0; 939 1.3 mrg #endif 940 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; 941 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 942 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 943 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 944 1.3 mrg 945 1.8 mrg static _GLIBCXX_CONSTEXPR short 946 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 947 1.3 mrg 948 1.8 mrg static _GLIBCXX_CONSTEXPR short 949 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 950 1.3 mrg 951 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 952 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 953 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 954 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 955 1.3 mrg 956 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 957 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 958 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 959 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 960 1.3 mrg = denorm_absent; 961 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 962 1.3 mrg 963 1.8 mrg static _GLIBCXX_CONSTEXPR short 964 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return short(); } 965 1.3 mrg 966 1.8 mrg static _GLIBCXX_CONSTEXPR short 967 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); } 968 1.3 mrg 969 1.8 mrg static _GLIBCXX_CONSTEXPR short 970 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return short(); } 971 1.3 mrg 972 1.8 mrg static _GLIBCXX_CONSTEXPR short 973 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return short(); } 974 1.3 mrg 975 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 976 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 977 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; 978 1.3 mrg 979 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 980 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 981 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 982 1.3 mrg = round_toward_zero; 983 1.1 mrg }; 984 1.1 mrg 985 1.1 mrg /// numeric_limits<unsigned short> specialization. 986 1.1 mrg template<> 987 1.1 mrg struct numeric_limits<unsigned short> 988 1.1 mrg { 989 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 990 1.3 mrg 991 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned short 992 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return 0; } 993 1.1 mrg 994 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned short 995 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __SHRT_MAX__ * 2U + 1; } 996 1.1 mrg 997 1.3 mrg #if __cplusplus >= 201103L 998 1.8 mrg static constexpr unsigned short 999 1.3 mrg lowest() noexcept { return min(); } 1000 1.3 mrg #endif 1001 1.3 mrg 1002 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits 1003 1.3 mrg = __glibcxx_digits (unsigned short); 1004 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 1005 1.3 mrg = __glibcxx_digits10 (unsigned short); 1006 1.3 mrg #if __cplusplus >= 201103L 1007 1.3 mrg static constexpr int max_digits10 = 0; 1008 1.3 mrg #endif 1009 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; 1010 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 1011 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 1012 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 1013 1.3 mrg 1014 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned short 1015 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 1016 1.3 mrg 1017 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned short 1018 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 1019 1.3 mrg 1020 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 1021 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 1022 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 1023 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 1024 1.3 mrg 1025 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 1026 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 1027 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 1028 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 1029 1.3 mrg = denorm_absent; 1030 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 1031 1.3 mrg 1032 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned short 1033 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT 1034 1.1 mrg { return static_cast<unsigned short>(0); } 1035 1.3 mrg 1036 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned short 1037 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT 1038 1.1 mrg { return static_cast<unsigned short>(0); } 1039 1.3 mrg 1040 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned short 1041 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT 1042 1.1 mrg { return static_cast<unsigned short>(0); } 1043 1.3 mrg 1044 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned short 1045 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT 1046 1.1 mrg { return static_cast<unsigned short>(0); } 1047 1.1 mrg 1048 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 1049 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 1050 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; 1051 1.3 mrg 1052 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 1053 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 1054 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 1055 1.3 mrg = round_toward_zero; 1056 1.1 mrg }; 1057 1.1 mrg 1058 1.1 mrg /// numeric_limits<int> specialization. 1059 1.1 mrg template<> 1060 1.1 mrg struct numeric_limits<int> 1061 1.1 mrg { 1062 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 1063 1.3 mrg 1064 1.8 mrg static _GLIBCXX_CONSTEXPR int 1065 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return -__INT_MAX__ - 1; } 1066 1.3 mrg 1067 1.8 mrg static _GLIBCXX_CONSTEXPR int 1068 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__; } 1069 1.3 mrg 1070 1.3 mrg #if __cplusplus >= 201103L 1071 1.8 mrg static constexpr int 1072 1.3 mrg lowest() noexcept { return min(); } 1073 1.3 mrg #endif 1074 1.3 mrg 1075 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (int); 1076 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (int); 1077 1.3 mrg #if __cplusplus >= 201103L 1078 1.3 mrg static constexpr int max_digits10 = 0; 1079 1.3 mrg #endif 1080 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; 1081 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 1082 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 1083 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 1084 1.3 mrg 1085 1.8 mrg static _GLIBCXX_CONSTEXPR int 1086 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 1087 1.3 mrg 1088 1.8 mrg static _GLIBCXX_CONSTEXPR int 1089 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 1090 1.1 mrg 1091 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 1092 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 1093 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 1094 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 1095 1.3 mrg 1096 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 1097 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 1098 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 1099 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 1100 1.3 mrg = denorm_absent; 1101 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 1102 1.3 mrg 1103 1.8 mrg static _GLIBCXX_CONSTEXPR int 1104 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); } 1105 1.3 mrg 1106 1.8 mrg static _GLIBCXX_CONSTEXPR int 1107 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); } 1108 1.3 mrg 1109 1.8 mrg static _GLIBCXX_CONSTEXPR int 1110 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); } 1111 1.3 mrg 1112 1.8 mrg static _GLIBCXX_CONSTEXPR int 1113 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<int>(0); } 1114 1.3 mrg 1115 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 1116 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 1117 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; 1118 1.3 mrg 1119 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 1120 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 1121 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 1122 1.3 mrg = round_toward_zero; 1123 1.1 mrg }; 1124 1.1 mrg 1125 1.1 mrg /// numeric_limits<unsigned int> specialization. 1126 1.1 mrg template<> 1127 1.1 mrg struct numeric_limits<unsigned int> 1128 1.1 mrg { 1129 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 1130 1.1 mrg 1131 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned int 1132 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return 0; } 1133 1.1 mrg 1134 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned int 1135 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __INT_MAX__ * 2U + 1; } 1136 1.3 mrg 1137 1.3 mrg #if __cplusplus >= 201103L 1138 1.8 mrg static constexpr unsigned int 1139 1.3 mrg lowest() noexcept { return min(); } 1140 1.3 mrg #endif 1141 1.3 mrg 1142 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits 1143 1.3 mrg = __glibcxx_digits (unsigned int); 1144 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 1145 1.3 mrg = __glibcxx_digits10 (unsigned int); 1146 1.3 mrg #if __cplusplus >= 201103L 1147 1.3 mrg static constexpr int max_digits10 = 0; 1148 1.3 mrg #endif 1149 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; 1150 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 1151 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 1152 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 1153 1.3 mrg 1154 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned int 1155 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 1156 1.3 mrg 1157 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned int 1158 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 1159 1.3 mrg 1160 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 1161 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 1162 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 1163 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 1164 1.3 mrg 1165 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 1166 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 1167 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 1168 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 1169 1.3 mrg = denorm_absent; 1170 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 1171 1.3 mrg 1172 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned int 1173 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<unsigned int>(0); } 1174 1.3 mrg 1175 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned int 1176 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT 1177 1.1 mrg { return static_cast<unsigned int>(0); } 1178 1.3 mrg 1179 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned int 1180 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT 1181 1.1 mrg { return static_cast<unsigned int>(0); } 1182 1.3 mrg 1183 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned int 1184 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT 1185 1.1 mrg { return static_cast<unsigned int>(0); } 1186 1.1 mrg 1187 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 1188 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 1189 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; 1190 1.3 mrg 1191 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 1192 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 1193 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 1194 1.3 mrg = round_toward_zero; 1195 1.1 mrg }; 1196 1.1 mrg 1197 1.1 mrg /// numeric_limits<long> specialization. 1198 1.1 mrg template<> 1199 1.1 mrg struct numeric_limits<long> 1200 1.1 mrg { 1201 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 1202 1.3 mrg 1203 1.3 mrg static _GLIBCXX_CONSTEXPR long 1204 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_MAX__ - 1; } 1205 1.3 mrg 1206 1.8 mrg static _GLIBCXX_CONSTEXPR long 1207 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__; } 1208 1.3 mrg 1209 1.3 mrg #if __cplusplus >= 201103L 1210 1.8 mrg static constexpr long 1211 1.3 mrg lowest() noexcept { return min(); } 1212 1.3 mrg #endif 1213 1.3 mrg 1214 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = __glibcxx_digits (long); 1215 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 = __glibcxx_digits10 (long); 1216 1.3 mrg #if __cplusplus >= 201103L 1217 1.3 mrg static constexpr int max_digits10 = 0; 1218 1.3 mrg #endif 1219 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; 1220 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 1221 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 1222 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 1223 1.3 mrg 1224 1.8 mrg static _GLIBCXX_CONSTEXPR long 1225 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 1226 1.3 mrg 1227 1.8 mrg static _GLIBCXX_CONSTEXPR long 1228 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 1229 1.3 mrg 1230 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 1231 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 1232 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 1233 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 1234 1.3 mrg 1235 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 1236 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 1237 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 1238 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 1239 1.3 mrg = denorm_absent; 1240 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 1241 1.3 mrg 1242 1.8 mrg static _GLIBCXX_CONSTEXPR long 1243 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); } 1244 1.3 mrg 1245 1.8 mrg static _GLIBCXX_CONSTEXPR long 1246 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); } 1247 1.3 mrg 1248 1.8 mrg static _GLIBCXX_CONSTEXPR long 1249 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); } 1250 1.3 mrg 1251 1.8 mrg static _GLIBCXX_CONSTEXPR long 1252 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long>(0); } 1253 1.3 mrg 1254 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 1255 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 1256 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; 1257 1.1 mrg 1258 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 1259 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 1260 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 1261 1.3 mrg = round_toward_zero; 1262 1.1 mrg }; 1263 1.1 mrg 1264 1.1 mrg /// numeric_limits<unsigned long> specialization. 1265 1.1 mrg template<> 1266 1.1 mrg struct numeric_limits<unsigned long> 1267 1.1 mrg { 1268 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 1269 1.1 mrg 1270 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long 1271 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return 0; } 1272 1.1 mrg 1273 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long 1274 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __LONG_MAX__ * 2UL + 1; } 1275 1.3 mrg 1276 1.3 mrg #if __cplusplus >= 201103L 1277 1.8 mrg static constexpr unsigned long 1278 1.3 mrg lowest() noexcept { return min(); } 1279 1.3 mrg #endif 1280 1.3 mrg 1281 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits 1282 1.3 mrg = __glibcxx_digits (unsigned long); 1283 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 1284 1.3 mrg = __glibcxx_digits10 (unsigned long); 1285 1.3 mrg #if __cplusplus >= 201103L 1286 1.3 mrg static constexpr int max_digits10 = 0; 1287 1.3 mrg #endif 1288 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; 1289 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 1290 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 1291 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 1292 1.3 mrg 1293 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long 1294 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 1295 1.3 mrg 1296 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long 1297 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 1298 1.3 mrg 1299 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 1300 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 1301 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 1302 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 1303 1.3 mrg 1304 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 1305 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 1306 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 1307 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 1308 1.3 mrg = denorm_absent; 1309 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 1310 1.3 mrg 1311 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long 1312 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT 1313 1.1 mrg { return static_cast<unsigned long>(0); } 1314 1.3 mrg 1315 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long 1316 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT 1317 1.1 mrg { return static_cast<unsigned long>(0); } 1318 1.3 mrg 1319 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long 1320 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT 1321 1.1 mrg { return static_cast<unsigned long>(0); } 1322 1.3 mrg 1323 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long 1324 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT 1325 1.1 mrg { return static_cast<unsigned long>(0); } 1326 1.1 mrg 1327 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 1328 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 1329 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; 1330 1.3 mrg 1331 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 1332 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 1333 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 1334 1.3 mrg = round_toward_zero; 1335 1.1 mrg }; 1336 1.1 mrg 1337 1.1 mrg /// numeric_limits<long long> specialization. 1338 1.1 mrg template<> 1339 1.1 mrg struct numeric_limits<long long> 1340 1.1 mrg { 1341 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 1342 1.3 mrg 1343 1.8 mrg static _GLIBCXX_CONSTEXPR long long 1344 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return -__LONG_LONG_MAX__ - 1; } 1345 1.3 mrg 1346 1.8 mrg static _GLIBCXX_CONSTEXPR long long 1347 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__; } 1348 1.3 mrg 1349 1.3 mrg #if __cplusplus >= 201103L 1350 1.8 mrg static constexpr long long 1351 1.3 mrg lowest() noexcept { return min(); } 1352 1.3 mrg #endif 1353 1.3 mrg 1354 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits 1355 1.3 mrg = __glibcxx_digits (long long); 1356 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 1357 1.3 mrg = __glibcxx_digits10 (long long); 1358 1.3 mrg #if __cplusplus >= 201103L 1359 1.3 mrg static constexpr int max_digits10 = 0; 1360 1.3 mrg #endif 1361 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; 1362 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 1363 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 1364 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 1365 1.3 mrg 1366 1.8 mrg static _GLIBCXX_CONSTEXPR long long 1367 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 1368 1.3 mrg 1369 1.8 mrg static _GLIBCXX_CONSTEXPR long long 1370 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 1371 1.3 mrg 1372 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 1373 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 1374 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 1375 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 1376 1.1 mrg 1377 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 1378 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 1379 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 1380 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 1381 1.3 mrg = denorm_absent; 1382 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 1383 1.1 mrg 1384 1.8 mrg static _GLIBCXX_CONSTEXPR long long 1385 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); } 1386 1.3 mrg 1387 1.8 mrg static _GLIBCXX_CONSTEXPR long long 1388 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); } 1389 1.3 mrg 1390 1.8 mrg static _GLIBCXX_CONSTEXPR long long 1391 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT 1392 1.1 mrg { return static_cast<long long>(0); } 1393 1.1 mrg 1394 1.8 mrg static _GLIBCXX_CONSTEXPR long long 1395 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return static_cast<long long>(0); } 1396 1.3 mrg 1397 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 1398 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 1399 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; 1400 1.3 mrg 1401 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 1402 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 1403 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 1404 1.3 mrg = round_toward_zero; 1405 1.1 mrg }; 1406 1.1 mrg 1407 1.1 mrg /// numeric_limits<unsigned long long> specialization. 1408 1.1 mrg template<> 1409 1.1 mrg struct numeric_limits<unsigned long long> 1410 1.1 mrg { 1411 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 1412 1.3 mrg 1413 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long long 1414 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return 0; } 1415 1.1 mrg 1416 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long long 1417 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __LONG_LONG_MAX__ * 2ULL + 1; } 1418 1.1 mrg 1419 1.3 mrg #if __cplusplus >= 201103L 1420 1.8 mrg static constexpr unsigned long long 1421 1.3 mrg lowest() noexcept { return min(); } 1422 1.3 mrg #endif 1423 1.3 mrg 1424 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits 1425 1.3 mrg = __glibcxx_digits (unsigned long long); 1426 1.8 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 1427 1.3 mrg = __glibcxx_digits10 (unsigned long long); 1428 1.3 mrg #if __cplusplus >= 201103L 1429 1.3 mrg static constexpr int max_digits10 = 0; 1430 1.3 mrg #endif 1431 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; 1432 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; 1433 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; 1434 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; 1435 1.3 mrg 1436 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long long 1437 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } 1438 1.3 mrg 1439 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long long 1440 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } 1441 1.3 mrg 1442 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; 1443 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; 1444 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; 1445 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; 1446 1.3 mrg 1447 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; 1448 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; 1449 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; 1450 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 1451 1.3 mrg = denorm_absent; 1452 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; 1453 1.3 mrg 1454 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long long 1455 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT 1456 1.1 mrg { return static_cast<unsigned long long>(0); } 1457 1.3 mrg 1458 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long long 1459 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT 1460 1.1 mrg { return static_cast<unsigned long long>(0); } 1461 1.3 mrg 1462 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long long 1463 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT 1464 1.1 mrg { return static_cast<unsigned long long>(0); } 1465 1.3 mrg 1466 1.8 mrg static _GLIBCXX_CONSTEXPR unsigned long long 1467 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT 1468 1.1 mrg { return static_cast<unsigned long long>(0); } 1469 1.1 mrg 1470 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; 1471 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 1472 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; 1473 1.3 mrg 1474 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; 1475 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; 1476 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 1477 1.3 mrg = round_toward_zero; 1478 1.1 mrg }; 1479 1.1 mrg 1480 1.12 mrg #define __INT_N(TYPE, BITSIZE, EXT, UEXT) \ 1481 1.12 mrg __extension__ \ 1482 1.12 mrg template<> \ 1483 1.12 mrg struct numeric_limits<TYPE> \ 1484 1.12 mrg { \ 1485 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \ 1486 1.12 mrg \ 1487 1.12 mrg static _GLIBCXX_CONSTEXPR TYPE \ 1488 1.12 mrg min() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_min_b (TYPE, BITSIZE); } \ 1489 1.12 mrg \ 1490 1.12 mrg static _GLIBCXX_CONSTEXPR TYPE \ 1491 1.12 mrg max() _GLIBCXX_USE_NOEXCEPT { return __glibcxx_max_b (TYPE, BITSIZE); } \ 1492 1.12 mrg \ 1493 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int digits \ 1494 1.12 mrg = BITSIZE - 1; \ 1495 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 \ 1496 1.12 mrg = (BITSIZE - 1) * 643L / 2136; \ 1497 1.12 mrg \ 1498 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; \ 1499 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \ 1500 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \ 1501 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; \ 1502 1.12 mrg \ 1503 1.12 mrg static _GLIBCXX_CONSTEXPR TYPE \ 1504 1.12 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } \ 1505 1.12 mrg \ 1506 1.12 mrg static _GLIBCXX_CONSTEXPR TYPE \ 1507 1.12 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } \ 1508 1.12 mrg \ 1509 1.12 mrg EXT \ 1510 1.12 mrg \ 1511 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; \ 1512 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; \ 1513 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; \ 1514 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; \ 1515 1.12 mrg \ 1516 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; \ 1517 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; \ 1518 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; \ 1519 1.12 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm \ 1520 1.12 mrg = denorm_absent; \ 1521 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; \ 1522 1.12 mrg \ 1523 1.12 mrg static _GLIBCXX_CONSTEXPR TYPE \ 1524 1.12 mrg infinity() _GLIBCXX_USE_NOEXCEPT \ 1525 1.12 mrg { return static_cast<TYPE>(0); } \ 1526 1.12 mrg \ 1527 1.12 mrg static _GLIBCXX_CONSTEXPR TYPE \ 1528 1.12 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT \ 1529 1.12 mrg { return static_cast<TYPE>(0); } \ 1530 1.12 mrg \ 1531 1.12 mrg static _GLIBCXX_CONSTEXPR TYPE \ 1532 1.12 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT \ 1533 1.12 mrg { return static_cast<TYPE>(0); } \ 1534 1.12 mrg \ 1535 1.12 mrg static _GLIBCXX_CONSTEXPR TYPE \ 1536 1.12 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT \ 1537 1.12 mrg { return static_cast<TYPE>(0); } \ 1538 1.12 mrg \ 1539 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; \ 1540 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; \ 1541 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; \ 1542 1.12 mrg \ 1543 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool traps \ 1544 1.12 mrg = __glibcxx_integral_traps; \ 1545 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; \ 1546 1.12 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style \ 1547 1.12 mrg = round_toward_zero; \ 1548 1.12 mrg }; \ 1549 1.12 mrg \ 1550 1.12 mrg __extension__ \ 1551 1.12 mrg template<> \ 1552 1.12 mrg struct numeric_limits<unsigned TYPE> \ 1553 1.12 mrg { \ 1554 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; \ 1555 1.12 mrg \ 1556 1.12 mrg static _GLIBCXX_CONSTEXPR unsigned TYPE \ 1557 1.12 mrg min() _GLIBCXX_USE_NOEXCEPT { return 0; } \ 1558 1.12 mrg \ 1559 1.12 mrg static _GLIBCXX_CONSTEXPR unsigned TYPE \ 1560 1.12 mrg max() _GLIBCXX_USE_NOEXCEPT \ 1561 1.12 mrg { return __glibcxx_max_b (unsigned TYPE, BITSIZE); } \ 1562 1.12 mrg \ 1563 1.12 mrg UEXT \ 1564 1.12 mrg \ 1565 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int digits \ 1566 1.12 mrg = BITSIZE; \ 1567 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 \ 1568 1.12 mrg = BITSIZE * 643L / 2136; \ 1569 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = false; \ 1570 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = true; \ 1571 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = true; \ 1572 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int radix = 2; \ 1573 1.12 mrg \ 1574 1.12 mrg static _GLIBCXX_CONSTEXPR unsigned TYPE \ 1575 1.12 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return 0; } \ 1576 1.12 mrg \ 1577 1.12 mrg static _GLIBCXX_CONSTEXPR unsigned TYPE \ 1578 1.12 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0; } \ 1579 1.12 mrg \ 1580 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = 0; \ 1581 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = 0; \ 1582 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = 0; \ 1583 1.12 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = 0; \ 1584 1.12 mrg \ 1585 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = false; \ 1586 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = false; \ 1587 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = false; \ 1588 1.12 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm \ 1589 1.12 mrg = denorm_absent; \ 1590 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss = false; \ 1591 1.12 mrg \ 1592 1.12 mrg static _GLIBCXX_CONSTEXPR unsigned TYPE \ 1593 1.12 mrg infinity() _GLIBCXX_USE_NOEXCEPT \ 1594 1.12 mrg { return static_cast<unsigned TYPE>(0); } \ 1595 1.12 mrg \ 1596 1.12 mrg static _GLIBCXX_CONSTEXPR unsigned TYPE \ 1597 1.12 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT \ 1598 1.12 mrg { return static_cast<unsigned TYPE>(0); } \ 1599 1.12 mrg \ 1600 1.12 mrg static _GLIBCXX_CONSTEXPR unsigned TYPE \ 1601 1.12 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT \ 1602 1.12 mrg { return static_cast<unsigned TYPE>(0); } \ 1603 1.12 mrg \ 1604 1.12 mrg static _GLIBCXX_CONSTEXPR unsigned TYPE \ 1605 1.12 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT \ 1606 1.12 mrg { return static_cast<unsigned TYPE>(0); } \ 1607 1.12 mrg \ 1608 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 = false; \ 1609 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; \ 1610 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = true; \ 1611 1.12 mrg \ 1612 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_integral_traps; \ 1613 1.12 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = false; \ 1614 1.12 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style \ 1615 1.12 mrg = round_toward_zero; \ 1616 1.12 mrg }; 1617 1.12 mrg 1618 1.12 mrg #if __cplusplus >= 201103L 1619 1.12 mrg 1620 1.12 mrg #define __INT_N_201103(TYPE) \ 1621 1.12 mrg static constexpr TYPE \ 1622 1.12 mrg lowest() noexcept { return min(); } \ 1623 1.5 mrg static constexpr int max_digits10 = 0; 1624 1.3 mrg 1625 1.12 mrg #define __INT_N_U201103(TYPE) \ 1626 1.12 mrg static constexpr unsigned TYPE \ 1627 1.12 mrg lowest() noexcept { return min(); } \ 1628 1.5 mrg static constexpr int max_digits10 = 0; 1629 1.3 mrg 1630 1.5 mrg #else 1631 1.5 mrg #define __INT_N_201103(TYPE) 1632 1.5 mrg #define __INT_N_U201103(TYPE) 1633 1.3 mrg #endif 1634 1.3 mrg 1635 1.11 mrg #if !defined(__STRICT_ANSI__) 1636 1.5 mrg #ifdef __GLIBCXX_TYPE_INT_N_0 1637 1.5 mrg __INT_N(__GLIBCXX_TYPE_INT_N_0, __GLIBCXX_BITSIZE_INT_N_0, 1638 1.12 mrg __INT_N_201103 (__GLIBCXX_TYPE_INT_N_0), 1639 1.12 mrg __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_0)) 1640 1.5 mrg #endif 1641 1.5 mrg #ifdef __GLIBCXX_TYPE_INT_N_1 1642 1.5 mrg __INT_N (__GLIBCXX_TYPE_INT_N_1, __GLIBCXX_BITSIZE_INT_N_1, 1643 1.12 mrg __INT_N_201103 (__GLIBCXX_TYPE_INT_N_1), 1644 1.12 mrg __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_1)) 1645 1.3 mrg #endif 1646 1.5 mrg #ifdef __GLIBCXX_TYPE_INT_N_2 1647 1.5 mrg __INT_N (__GLIBCXX_TYPE_INT_N_2, __GLIBCXX_BITSIZE_INT_N_2, 1648 1.12 mrg __INT_N_201103 (__GLIBCXX_TYPE_INT_N_2), 1649 1.12 mrg __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_2)) 1650 1.3 mrg #endif 1651 1.5 mrg #ifdef __GLIBCXX_TYPE_INT_N_3 1652 1.5 mrg __INT_N (__GLIBCXX_TYPE_INT_N_3, __GLIBCXX_BITSIZE_INT_N_3, 1653 1.12 mrg __INT_N_201103 (__GLIBCXX_TYPE_INT_N_3), 1654 1.12 mrg __INT_N_U201103 (__GLIBCXX_TYPE_INT_N_3)) 1655 1.3 mrg #endif 1656 1.3 mrg 1657 1.11 mrg #elif defined __STRICT_ANSI__ && defined __SIZEOF_INT128__ 1658 1.11 mrg __INT_N(__int128, 128, 1659 1.11 mrg __INT_N_201103 (__int128), 1660 1.11 mrg __INT_N_U201103 (__int128)) 1661 1.11 mrg #endif 1662 1.11 mrg 1663 1.5 mrg #undef __INT_N 1664 1.5 mrg #undef __INT_N_201103 1665 1.5 mrg #undef __INT_N_U201103 1666 1.3 mrg 1667 1.3 mrg 1668 1.1 mrg /// numeric_limits<float> specialization. 1669 1.1 mrg template<> 1670 1.1 mrg struct numeric_limits<float> 1671 1.1 mrg { 1672 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 1673 1.3 mrg 1674 1.8 mrg static _GLIBCXX_CONSTEXPR float 1675 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return __FLT_MIN__; } 1676 1.3 mrg 1677 1.8 mrg static _GLIBCXX_CONSTEXPR float 1678 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __FLT_MAX__; } 1679 1.1 mrg 1680 1.3 mrg #if __cplusplus >= 201103L 1681 1.8 mrg static constexpr float 1682 1.3 mrg lowest() noexcept { return -__FLT_MAX__; } 1683 1.1 mrg #endif 1684 1.1 mrg 1685 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = __FLT_MANT_DIG__; 1686 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 = __FLT_DIG__; 1687 1.3 mrg #if __cplusplus >= 201103L 1688 1.3 mrg static constexpr int max_digits10 1689 1.1 mrg = __glibcxx_max_digits10 (__FLT_MANT_DIG__); 1690 1.1 mrg #endif 1691 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; 1692 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = false; 1693 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; 1694 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__; 1695 1.3 mrg 1696 1.8 mrg static _GLIBCXX_CONSTEXPR float 1697 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return __FLT_EPSILON__; } 1698 1.3 mrg 1699 1.8 mrg static _GLIBCXX_CONSTEXPR float 1700 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5F; } 1701 1.3 mrg 1702 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = __FLT_MIN_EXP__; 1703 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __FLT_MIN_10_EXP__; 1704 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = __FLT_MAX_EXP__; 1705 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __FLT_MAX_10_EXP__; 1706 1.3 mrg 1707 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __FLT_HAS_INFINITY__; 1708 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __FLT_HAS_QUIET_NAN__; 1709 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN; 1710 1.3 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 1711 1.1 mrg = bool(__FLT_HAS_DENORM__) ? denorm_present : denorm_absent; 1712 1.8 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss 1713 1.3 mrg = __glibcxx_float_has_denorm_loss; 1714 1.1 mrg 1715 1.8 mrg static _GLIBCXX_CONSTEXPR float 1716 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_valf(); } 1717 1.1 mrg 1718 1.8 mrg static _GLIBCXX_CONSTEXPR float 1719 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanf(""); } 1720 1.3 mrg 1721 1.8 mrg static _GLIBCXX_CONSTEXPR float 1722 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansf(""); } 1723 1.3 mrg 1724 1.8 mrg static _GLIBCXX_CONSTEXPR float 1725 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return __FLT_DENORM_MIN__; } 1726 1.3 mrg 1727 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 1728 1.1 mrg = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 1729 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 1730 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; 1731 1.1 mrg 1732 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_float_traps; 1733 1.8 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before 1734 1.3 mrg = __glibcxx_float_tinyness_before; 1735 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 1736 1.3 mrg = round_to_nearest; 1737 1.1 mrg }; 1738 1.1 mrg 1739 1.1 mrg #undef __glibcxx_float_has_denorm_loss 1740 1.1 mrg #undef __glibcxx_float_traps 1741 1.1 mrg #undef __glibcxx_float_tinyness_before 1742 1.1 mrg 1743 1.1 mrg /// numeric_limits<double> specialization. 1744 1.1 mrg template<> 1745 1.1 mrg struct numeric_limits<double> 1746 1.1 mrg { 1747 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 1748 1.3 mrg 1749 1.8 mrg static _GLIBCXX_CONSTEXPR double 1750 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return __DBL_MIN__; } 1751 1.1 mrg 1752 1.8 mrg static _GLIBCXX_CONSTEXPR double 1753 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __DBL_MAX__; } 1754 1.3 mrg 1755 1.3 mrg #if __cplusplus >= 201103L 1756 1.8 mrg static constexpr double 1757 1.3 mrg lowest() noexcept { return -__DBL_MAX__; } 1758 1.1 mrg #endif 1759 1.1 mrg 1760 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = __DBL_MANT_DIG__; 1761 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 = __DBL_DIG__; 1762 1.3 mrg #if __cplusplus >= 201103L 1763 1.3 mrg static constexpr int max_digits10 1764 1.1 mrg = __glibcxx_max_digits10 (__DBL_MANT_DIG__); 1765 1.1 mrg #endif 1766 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; 1767 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = false; 1768 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; 1769 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__; 1770 1.3 mrg 1771 1.8 mrg static _GLIBCXX_CONSTEXPR double 1772 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return __DBL_EPSILON__; } 1773 1.3 mrg 1774 1.8 mrg static _GLIBCXX_CONSTEXPR double 1775 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5; } 1776 1.3 mrg 1777 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = __DBL_MIN_EXP__; 1778 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __DBL_MIN_10_EXP__; 1779 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = __DBL_MAX_EXP__; 1780 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __DBL_MAX_10_EXP__; 1781 1.3 mrg 1782 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __DBL_HAS_INFINITY__; 1783 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __DBL_HAS_QUIET_NAN__; 1784 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN; 1785 1.3 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 1786 1.1 mrg = bool(__DBL_HAS_DENORM__) ? denorm_present : denorm_absent; 1787 1.8 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss 1788 1.3 mrg = __glibcxx_double_has_denorm_loss; 1789 1.3 mrg 1790 1.8 mrg static _GLIBCXX_CONSTEXPR double 1791 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_val(); } 1792 1.3 mrg 1793 1.8 mrg static _GLIBCXX_CONSTEXPR double 1794 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nan(""); } 1795 1.1 mrg 1796 1.8 mrg static _GLIBCXX_CONSTEXPR double 1797 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nans(""); } 1798 1.1 mrg 1799 1.8 mrg static _GLIBCXX_CONSTEXPR double 1800 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return __DBL_DENORM_MIN__; } 1801 1.3 mrg 1802 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 1803 1.1 mrg = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 1804 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 1805 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; 1806 1.1 mrg 1807 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_double_traps; 1808 1.8 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before 1809 1.3 mrg = __glibcxx_double_tinyness_before; 1810 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style 1811 1.3 mrg = round_to_nearest; 1812 1.1 mrg }; 1813 1.1 mrg 1814 1.1 mrg #undef __glibcxx_double_has_denorm_loss 1815 1.1 mrg #undef __glibcxx_double_traps 1816 1.1 mrg #undef __glibcxx_double_tinyness_before 1817 1.1 mrg 1818 1.1 mrg /// numeric_limits<long double> specialization. 1819 1.1 mrg template<> 1820 1.1 mrg struct numeric_limits<long double> 1821 1.1 mrg { 1822 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_specialized = true; 1823 1.3 mrg 1824 1.8 mrg static _GLIBCXX_CONSTEXPR long double 1825 1.3 mrg min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MIN__; } 1826 1.3 mrg 1827 1.8 mrg static _GLIBCXX_CONSTEXPR long double 1828 1.3 mrg max() _GLIBCXX_USE_NOEXCEPT { return __LDBL_MAX__; } 1829 1.1 mrg 1830 1.3 mrg #if __cplusplus >= 201103L 1831 1.8 mrg static constexpr long double 1832 1.3 mrg lowest() noexcept { return -__LDBL_MAX__; } 1833 1.1 mrg #endif 1834 1.1 mrg 1835 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits = __LDBL_MANT_DIG__; 1836 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int digits10 = __LDBL_DIG__; 1837 1.3 mrg #if __cplusplus >= 201103L 1838 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_digits10 1839 1.1 mrg = __glibcxx_max_digits10 (__LDBL_MANT_DIG__); 1840 1.1 mrg #endif 1841 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_signed = true; 1842 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_integer = false; 1843 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_exact = false; 1844 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int radix = __FLT_RADIX__; 1845 1.3 mrg 1846 1.8 mrg static _GLIBCXX_CONSTEXPR long double 1847 1.3 mrg epsilon() _GLIBCXX_USE_NOEXCEPT { return __LDBL_EPSILON__; } 1848 1.3 mrg 1849 1.8 mrg static _GLIBCXX_CONSTEXPR long double 1850 1.3 mrg round_error() _GLIBCXX_USE_NOEXCEPT { return 0.5L; } 1851 1.3 mrg 1852 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent = __LDBL_MIN_EXP__; 1853 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int min_exponent10 = __LDBL_MIN_10_EXP__; 1854 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent = __LDBL_MAX_EXP__; 1855 1.3 mrg static _GLIBCXX_USE_CONSTEXPR int max_exponent10 = __LDBL_MAX_10_EXP__; 1856 1.3 mrg 1857 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_infinity = __LDBL_HAS_INFINITY__; 1858 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_quiet_NaN = __LDBL_HAS_QUIET_NAN__; 1859 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_signaling_NaN = has_quiet_NaN; 1860 1.3 mrg static _GLIBCXX_USE_CONSTEXPR float_denorm_style has_denorm 1861 1.1 mrg = bool(__LDBL_HAS_DENORM__) ? denorm_present : denorm_absent; 1862 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool has_denorm_loss 1863 1.1 mrg = __glibcxx_long_double_has_denorm_loss; 1864 1.1 mrg 1865 1.8 mrg static _GLIBCXX_CONSTEXPR long double 1866 1.3 mrg infinity() _GLIBCXX_USE_NOEXCEPT { return __builtin_huge_vall(); } 1867 1.3 mrg 1868 1.8 mrg static _GLIBCXX_CONSTEXPR long double 1869 1.3 mrg quiet_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nanl(""); } 1870 1.3 mrg 1871 1.8 mrg static _GLIBCXX_CONSTEXPR long double 1872 1.3 mrg signaling_NaN() _GLIBCXX_USE_NOEXCEPT { return __builtin_nansl(""); } 1873 1.3 mrg 1874 1.8 mrg static _GLIBCXX_CONSTEXPR long double 1875 1.3 mrg denorm_min() _GLIBCXX_USE_NOEXCEPT { return __LDBL_DENORM_MIN__; } 1876 1.1 mrg 1877 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_iec559 1878 1.1 mrg = has_infinity && has_quiet_NaN && has_denorm == denorm_present; 1879 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_bounded = true; 1880 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool is_modulo = false; 1881 1.1 mrg 1882 1.3 mrg static _GLIBCXX_USE_CONSTEXPR bool traps = __glibcxx_long_double_traps; 1883 1.8 mrg static _GLIBCXX_USE_CONSTEXPR bool tinyness_before = 1884 1.3 mrg __glibcxx_long_double_tinyness_before; 1885 1.8 mrg static _GLIBCXX_USE_CONSTEXPR float_round_style round_style = 1886 1.3 mrg round_to_nearest; 1887 1.1 mrg }; 1888 1.1 mrg 1889 1.1 mrg #undef __glibcxx_long_double_has_denorm_loss 1890 1.1 mrg #undef __glibcxx_long_double_traps 1891 1.1 mrg #undef __glibcxx_long_double_tinyness_before 1892 1.1 mrg 1893 1.3 mrg _GLIBCXX_END_NAMESPACE_VERSION 1894 1.3 mrg } // namespace 1895 1.1 mrg 1896 1.1 mrg #undef __glibcxx_signed 1897 1.1 mrg #undef __glibcxx_min 1898 1.1 mrg #undef __glibcxx_max 1899 1.1 mrg #undef __glibcxx_digits 1900 1.1 mrg #undef __glibcxx_digits10 1901 1.1 mrg #undef __glibcxx_max_digits10 1902 1.1 mrg 1903 1.1 mrg #endif // _GLIBCXX_NUMERIC_LIMITS 1904