1// -*- C++ -*- 2//===----------------------------------------------------------------------===// 3// 4// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions. 5// See https://llvm.org/LICENSE.txt for license information. 6// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception 7// 8//===----------------------------------------------------------------------===// 9 10#ifndef _LIBCPP_LIMITS 11#define _LIBCPP_LIMITS 12 13/* 14 limits synopsis 15 16namespace std 17{ 18 19template<class T> 20class numeric_limits 21{ 22public: 23 static constexpr bool is_specialized = false; 24 static constexpr T min() noexcept; 25 static constexpr T max() noexcept; 26 static constexpr T lowest() noexcept; 27 28 static constexpr int digits = 0; 29 static constexpr int digits10 = 0; 30 static constexpr int max_digits10 = 0; 31 static constexpr bool is_signed = false; 32 static constexpr bool is_integer = false; 33 static constexpr bool is_exact = false; 34 static constexpr int radix = 0; 35 static constexpr T epsilon() noexcept; 36 static constexpr T round_error() noexcept; 37 38 static constexpr int min_exponent = 0; 39 static constexpr int min_exponent10 = 0; 40 static constexpr int max_exponent = 0; 41 static constexpr int max_exponent10 = 0; 42 43 static constexpr bool has_infinity = false; 44 static constexpr bool has_quiet_NaN = false; 45 static constexpr bool has_signaling_NaN = false; 46 static constexpr float_denorm_style has_denorm = denorm_absent; 47 static constexpr bool has_denorm_loss = false; 48 static constexpr T infinity() noexcept; 49 static constexpr T quiet_NaN() noexcept; 50 static constexpr T signaling_NaN() noexcept; 51 static constexpr T denorm_min() noexcept; 52 53 static constexpr bool is_iec559 = false; 54 static constexpr bool is_bounded = false; 55 static constexpr bool is_modulo = false; 56 57 static constexpr bool traps = false; 58 static constexpr bool tinyness_before = false; 59 static constexpr float_round_style round_style = round_toward_zero; 60}; 61 62enum float_round_style 63{ 64 round_indeterminate = -1, 65 round_toward_zero = 0, 66 round_to_nearest = 1, 67 round_toward_infinity = 2, 68 round_toward_neg_infinity = 3 69}; 70 71enum float_denorm_style 72{ 73 denorm_indeterminate = -1, 74 denorm_absent = 0, 75 denorm_present = 1 76}; 77 78template<> class numeric_limits<cv bool>; 79 80template<> class numeric_limits<cv char>; 81template<> class numeric_limits<cv signed char>; 82template<> class numeric_limits<cv unsigned char>; 83template<> class numeric_limits<cv wchar_t>; 84template<> class numeric_limits<cv char8_t>; // C++20 85template<> class numeric_limits<cv char16_t>; 86template<> class numeric_limits<cv char32_t>; 87 88template<> class numeric_limits<cv short>; 89template<> class numeric_limits<cv int>; 90template<> class numeric_limits<cv long>; 91template<> class numeric_limits<cv long long>; 92template<> class numeric_limits<cv unsigned short>; 93template<> class numeric_limits<cv unsigned int>; 94template<> class numeric_limits<cv unsigned long>; 95template<> class numeric_limits<cv unsigned long long>; 96 97template<> class numeric_limits<cv float>; 98template<> class numeric_limits<cv double>; 99template<> class numeric_limits<cv long double>; 100 101} // std 102 103*/ 104#include <__config> 105#include <type_traits> 106 107#if defined(_LIBCPP_COMPILER_MSVC) 108#include "__support/win32/limits_msvc_win32.h" 109#endif // _LIBCPP_MSVCRT 110 111#if defined(__IBMCPP__) 112#include "__support/ibm/limits.h" 113#endif // __IBMCPP__ 114 115#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 116# pragma GCC system_header 117#endif 118 119_LIBCPP_PUSH_MACROS 120#include <__undef_macros> 121#include <version> 122 123 124_LIBCPP_BEGIN_NAMESPACE_STD 125 126enum float_round_style 127{ 128 round_indeterminate = -1, 129 round_toward_zero = 0, 130 round_to_nearest = 1, 131 round_toward_infinity = 2, 132 round_toward_neg_infinity = 3 133}; 134 135enum float_denorm_style 136{ 137 denorm_indeterminate = -1, 138 denorm_absent = 0, 139 denorm_present = 1 140}; 141 142template <class _Tp, bool = is_arithmetic<_Tp>::value> 143class __libcpp_numeric_limits 144{ 145protected: 146 typedef _Tp type; 147 148 static _LIBCPP_CONSTEXPR const bool is_specialized = false; 149 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return type();} 150 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return type();} 151 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return type();} 152 153 static _LIBCPP_CONSTEXPR const int digits = 0; 154 static _LIBCPP_CONSTEXPR const int digits10 = 0; 155 static _LIBCPP_CONSTEXPR const int max_digits10 = 0; 156 static _LIBCPP_CONSTEXPR const bool is_signed = false; 157 static _LIBCPP_CONSTEXPR const bool is_integer = false; 158 static _LIBCPP_CONSTEXPR const bool is_exact = false; 159 static _LIBCPP_CONSTEXPR const int radix = 0; 160 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type();} 161 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type();} 162 163 static _LIBCPP_CONSTEXPR const int min_exponent = 0; 164 static _LIBCPP_CONSTEXPR const int min_exponent10 = 0; 165 static _LIBCPP_CONSTEXPR const int max_exponent = 0; 166 static _LIBCPP_CONSTEXPR const int max_exponent10 = 0; 167 168 static _LIBCPP_CONSTEXPR const bool has_infinity = false; 169 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false; 170 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false; 171 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent; 172 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 173 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type();} 174 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type();} 175 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type();} 176 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type();} 177 178 static _LIBCPP_CONSTEXPR const bool is_iec559 = false; 179 static _LIBCPP_CONSTEXPR const bool is_bounded = false; 180 static _LIBCPP_CONSTEXPR const bool is_modulo = false; 181 182 static _LIBCPP_CONSTEXPR const bool traps = false; 183 static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 184 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero; 185}; 186 187template <class _Tp, int __digits, bool _IsSigned> 188struct __libcpp_compute_min 189{ 190 static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits); 191}; 192 193template <class _Tp, int __digits> 194struct __libcpp_compute_min<_Tp, __digits, false> 195{ 196 static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0); 197}; 198 199template <class _Tp> 200class __libcpp_numeric_limits<_Tp, true> 201{ 202protected: 203 typedef _Tp type; 204 205 static _LIBCPP_CONSTEXPR const bool is_specialized = true; 206 207 static _LIBCPP_CONSTEXPR const bool is_signed = type(-1) < type(0); 208 static _LIBCPP_CONSTEXPR const int digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed); 209 static _LIBCPP_CONSTEXPR const int digits10 = digits * 3 / 10; 210 static _LIBCPP_CONSTEXPR const int max_digits10 = 0; 211 static _LIBCPP_CONSTEXPR const type __min = __libcpp_compute_min<type, digits, is_signed>::value; 212 static _LIBCPP_CONSTEXPR const type __max = is_signed ? type(type(~0) ^ __min) : type(~0); 213 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;} 214 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;} 215 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();} 216 217 static _LIBCPP_CONSTEXPR const bool is_integer = true; 218 static _LIBCPP_CONSTEXPR const bool is_exact = true; 219 static _LIBCPP_CONSTEXPR const int radix = 2; 220 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);} 221 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);} 222 223 static _LIBCPP_CONSTEXPR const int min_exponent = 0; 224 static _LIBCPP_CONSTEXPR const int min_exponent10 = 0; 225 static _LIBCPP_CONSTEXPR const int max_exponent = 0; 226 static _LIBCPP_CONSTEXPR const int max_exponent10 = 0; 227 228 static _LIBCPP_CONSTEXPR const bool has_infinity = false; 229 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false; 230 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false; 231 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent; 232 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 233 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);} 234 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);} 235 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);} 236 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);} 237 238 static _LIBCPP_CONSTEXPR const bool is_iec559 = false; 239 static _LIBCPP_CONSTEXPR const bool is_bounded = true; 240 static _LIBCPP_CONSTEXPR const bool is_modulo = !_VSTD::is_signed<_Tp>::value; 241 242#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \ 243 defined(__wasm__) 244 static _LIBCPP_CONSTEXPR const bool traps = true; 245#else 246 static _LIBCPP_CONSTEXPR const bool traps = false; 247#endif 248 static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 249 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero; 250}; 251 252template <> 253class __libcpp_numeric_limits<bool, true> 254{ 255protected: 256 typedef bool type; 257 258 static _LIBCPP_CONSTEXPR const bool is_specialized = true; 259 260 static _LIBCPP_CONSTEXPR const bool is_signed = false; 261 static _LIBCPP_CONSTEXPR const int digits = 1; 262 static _LIBCPP_CONSTEXPR const int digits10 = 0; 263 static _LIBCPP_CONSTEXPR const int max_digits10 = 0; 264 static _LIBCPP_CONSTEXPR const type __min = false; 265 static _LIBCPP_CONSTEXPR const type __max = true; 266 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;} 267 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;} 268 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();} 269 270 static _LIBCPP_CONSTEXPR const bool is_integer = true; 271 static _LIBCPP_CONSTEXPR const bool is_exact = true; 272 static _LIBCPP_CONSTEXPR const int radix = 2; 273 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);} 274 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);} 275 276 static _LIBCPP_CONSTEXPR const int min_exponent = 0; 277 static _LIBCPP_CONSTEXPR const int min_exponent10 = 0; 278 static _LIBCPP_CONSTEXPR const int max_exponent = 0; 279 static _LIBCPP_CONSTEXPR const int max_exponent10 = 0; 280 281 static _LIBCPP_CONSTEXPR const bool has_infinity = false; 282 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false; 283 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false; 284 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent; 285 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 286 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);} 287 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);} 288 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);} 289 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);} 290 291 static _LIBCPP_CONSTEXPR const bool is_iec559 = false; 292 static _LIBCPP_CONSTEXPR const bool is_bounded = true; 293 static _LIBCPP_CONSTEXPR const bool is_modulo = false; 294 295 static _LIBCPP_CONSTEXPR const bool traps = false; 296 static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 297 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero; 298}; 299 300template <> 301class __libcpp_numeric_limits<float, true> 302{ 303protected: 304 typedef float type; 305 306 static _LIBCPP_CONSTEXPR const bool is_specialized = true; 307 308 static _LIBCPP_CONSTEXPR const bool is_signed = true; 309 static _LIBCPP_CONSTEXPR const int digits = __FLT_MANT_DIG__; 310 static _LIBCPP_CONSTEXPR const int digits10 = __FLT_DIG__; 311 static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l; 312 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __FLT_MIN__;} 313 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __FLT_MAX__;} 314 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();} 315 316 static _LIBCPP_CONSTEXPR const bool is_integer = false; 317 static _LIBCPP_CONSTEXPR const bool is_exact = false; 318 static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__; 319 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __FLT_EPSILON__;} 320 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5F;} 321 322 static _LIBCPP_CONSTEXPR const int min_exponent = __FLT_MIN_EXP__; 323 static _LIBCPP_CONSTEXPR const int min_exponent10 = __FLT_MIN_10_EXP__; 324 static _LIBCPP_CONSTEXPR const int max_exponent = __FLT_MAX_EXP__; 325 static _LIBCPP_CONSTEXPR const int max_exponent10 = __FLT_MAX_10_EXP__; 326 327 static _LIBCPP_CONSTEXPR const bool has_infinity = true; 328 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true; 329 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true; 330 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present; 331 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 332 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();} 333 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");} 334 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");} 335 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __FLT_DENORM_MIN__;} 336 337 static _LIBCPP_CONSTEXPR const bool is_iec559 = true; 338 static _LIBCPP_CONSTEXPR const bool is_bounded = true; 339 static _LIBCPP_CONSTEXPR const bool is_modulo = false; 340 341 static _LIBCPP_CONSTEXPR const bool traps = false; 342#if (defined(__arm__) || defined(__aarch64__)) 343 static _LIBCPP_CONSTEXPR const bool tinyness_before = true; 344#else 345 static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 346#endif 347 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest; 348}; 349 350template <> 351class __libcpp_numeric_limits<double, true> 352{ 353protected: 354 typedef double type; 355 356 static _LIBCPP_CONSTEXPR const bool is_specialized = true; 357 358 static _LIBCPP_CONSTEXPR const bool is_signed = true; 359 static _LIBCPP_CONSTEXPR const int digits = __DBL_MANT_DIG__; 360 static _LIBCPP_CONSTEXPR const int digits10 = __DBL_DIG__; 361 static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l; 362 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __DBL_MIN__;} 363 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __DBL_MAX__;} 364 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();} 365 366 static _LIBCPP_CONSTEXPR const bool is_integer = false; 367 static _LIBCPP_CONSTEXPR const bool is_exact = false; 368 static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__; 369 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __DBL_EPSILON__;} 370 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5;} 371 372 static _LIBCPP_CONSTEXPR const int min_exponent = __DBL_MIN_EXP__; 373 static _LIBCPP_CONSTEXPR const int min_exponent10 = __DBL_MIN_10_EXP__; 374 static _LIBCPP_CONSTEXPR const int max_exponent = __DBL_MAX_EXP__; 375 static _LIBCPP_CONSTEXPR const int max_exponent10 = __DBL_MAX_10_EXP__; 376 377 static _LIBCPP_CONSTEXPR const bool has_infinity = true; 378 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true; 379 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true; 380 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present; 381 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 382 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_val();} 383 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nan("");} 384 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nans("");} 385 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __DBL_DENORM_MIN__;} 386 387 static _LIBCPP_CONSTEXPR const bool is_iec559 = true; 388 static _LIBCPP_CONSTEXPR const bool is_bounded = true; 389 static _LIBCPP_CONSTEXPR const bool is_modulo = false; 390 391 static _LIBCPP_CONSTEXPR const bool traps = false; 392#if (defined(__arm__) || defined(__aarch64__)) 393 static _LIBCPP_CONSTEXPR const bool tinyness_before = true; 394#else 395 static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 396#endif 397 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest; 398}; 399 400template <> 401class __libcpp_numeric_limits<long double, true> 402{ 403protected: 404 typedef long double type; 405 406 static _LIBCPP_CONSTEXPR const bool is_specialized = true; 407 408 static _LIBCPP_CONSTEXPR const bool is_signed = true; 409 static _LIBCPP_CONSTEXPR const int digits = __LDBL_MANT_DIG__; 410 static _LIBCPP_CONSTEXPR const int digits10 = __LDBL_DIG__; 411 static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103l)/100000l; 412 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __LDBL_MIN__;} 413 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __LDBL_MAX__;} 414 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();} 415 416 static _LIBCPP_CONSTEXPR const bool is_integer = false; 417 static _LIBCPP_CONSTEXPR const bool is_exact = false; 418 static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__; 419 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __LDBL_EPSILON__;} 420 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5L;} 421 422 static _LIBCPP_CONSTEXPR const int min_exponent = __LDBL_MIN_EXP__; 423 static _LIBCPP_CONSTEXPR const int min_exponent10 = __LDBL_MIN_10_EXP__; 424 static _LIBCPP_CONSTEXPR const int max_exponent = __LDBL_MAX_EXP__; 425 static _LIBCPP_CONSTEXPR const int max_exponent10 = __LDBL_MAX_10_EXP__; 426 427 static _LIBCPP_CONSTEXPR const bool has_infinity = true; 428 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true; 429 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true; 430 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present; 431 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 432 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_vall();} 433 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");} 434 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");} 435 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;} 436 437#if (defined(__ppc__) || defined(__ppc64__)) 438 static _LIBCPP_CONSTEXPR const bool is_iec559 = false; 439#else 440 static _LIBCPP_CONSTEXPR const bool is_iec559 = true; 441#endif 442 static _LIBCPP_CONSTEXPR const bool is_bounded = true; 443 static _LIBCPP_CONSTEXPR const bool is_modulo = false; 444 445 static _LIBCPP_CONSTEXPR const bool traps = false; 446#if (defined(__arm__) || defined(__aarch64__)) 447 static _LIBCPP_CONSTEXPR const bool tinyness_before = true; 448#else 449 static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 450#endif 451 static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest; 452}; 453 454template <class _Tp> 455class _LIBCPP_TEMPLATE_VIS numeric_limits 456 : private __libcpp_numeric_limits<typename remove_cv<_Tp>::type> 457{ 458 typedef __libcpp_numeric_limits<typename remove_cv<_Tp>::type> __base; 459 typedef typename __base::type type; 460public: 461 static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized; 462 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();} 463 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();} 464 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();} 465 466 static _LIBCPP_CONSTEXPR const int digits = __base::digits; 467 static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10; 468 static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10; 469 static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed; 470 static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer; 471 static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact; 472 static _LIBCPP_CONSTEXPR const int radix = __base::radix; 473 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();} 474 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();} 475 476 static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent; 477 static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10; 478 static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent; 479 static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10; 480 481 static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity; 482 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN; 483 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN; 484 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm; 485 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss; 486 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();} 487 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();} 488 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();} 489 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();} 490 491 static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559; 492 static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded; 493 static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo; 494 495 static _LIBCPP_CONSTEXPR const bool traps = __base::traps; 496 static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before; 497 static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style; 498}; 499 500template <class _Tp> 501 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized; 502template <class _Tp> 503 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits; 504template <class _Tp> 505 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits10; 506template <class _Tp> 507 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_digits10; 508template <class _Tp> 509 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_signed; 510template <class _Tp> 511 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_integer; 512template <class _Tp> 513 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_exact; 514template <class _Tp> 515 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::radix; 516template <class _Tp> 517 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent; 518template <class _Tp> 519 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10; 520template <class _Tp> 521 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent; 522template <class _Tp> 523 _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10; 524template <class _Tp> 525 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity; 526template <class _Tp> 527 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN; 528template <class _Tp> 529 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN; 530template <class _Tp> 531 _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm; 532template <class _Tp> 533 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss; 534template <class _Tp> 535 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559; 536template <class _Tp> 537 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded; 538template <class _Tp> 539 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo; 540template <class _Tp> 541 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::traps; 542template <class _Tp> 543 _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before; 544template <class _Tp> 545 _LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style; 546 547template <class _Tp> 548class _LIBCPP_TEMPLATE_VIS numeric_limits<const _Tp> 549 : private numeric_limits<_Tp> 550{ 551 typedef numeric_limits<_Tp> __base; 552 typedef _Tp type; 553public: 554 static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized; 555 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();} 556 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();} 557 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();} 558 559 static _LIBCPP_CONSTEXPR const int digits = __base::digits; 560 static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10; 561 static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10; 562 static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed; 563 static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer; 564 static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact; 565 static _LIBCPP_CONSTEXPR const int radix = __base::radix; 566 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();} 567 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();} 568 569 static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent; 570 static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10; 571 static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent; 572 static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10; 573 574 static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity; 575 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN; 576 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN; 577 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm; 578 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss; 579 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();} 580 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();} 581 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();} 582 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();} 583 584 static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559; 585 static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded; 586 static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo; 587 588 static _LIBCPP_CONSTEXPR const bool traps = __base::traps; 589 static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before; 590 static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style; 591}; 592 593template <class _Tp> 594 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_specialized; 595template <class _Tp> 596 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits; 597template <class _Tp> 598 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits10; 599template <class _Tp> 600 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_digits10; 601template <class _Tp> 602 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_signed; 603template <class _Tp> 604 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_integer; 605template <class _Tp> 606 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_exact; 607template <class _Tp> 608 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::radix; 609template <class _Tp> 610 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent; 611template <class _Tp> 612 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent10; 613template <class _Tp> 614 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent; 615template <class _Tp> 616 _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent10; 617template <class _Tp> 618 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_infinity; 619template <class _Tp> 620 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_quiet_NaN; 621template <class _Tp> 622 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_signaling_NaN; 623template <class _Tp> 624 _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const _Tp>::has_denorm; 625template <class _Tp> 626 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_denorm_loss; 627template <class _Tp> 628 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_iec559; 629template <class _Tp> 630 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_bounded; 631template <class _Tp> 632 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_modulo; 633template <class _Tp> 634 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::traps; 635template <class _Tp> 636 _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::tinyness_before; 637template <class _Tp> 638 _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style; 639 640template <class _Tp> 641class _LIBCPP_TEMPLATE_VIS numeric_limits<volatile _Tp> 642 : private numeric_limits<_Tp> 643{ 644 typedef numeric_limits<_Tp> __base; 645 typedef _Tp type; 646public: 647 static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized; 648 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();} 649 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();} 650 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();} 651 652 static _LIBCPP_CONSTEXPR const int digits = __base::digits; 653 static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10; 654 static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10; 655 static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed; 656 static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer; 657 static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact; 658 static _LIBCPP_CONSTEXPR const int radix = __base::radix; 659 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();} 660 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();} 661 662 static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent; 663 static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10; 664 static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent; 665 static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10; 666 667 static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity; 668 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN; 669 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN; 670 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm; 671 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss; 672 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();} 673 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();} 674 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();} 675 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();} 676 677 static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559; 678 static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded; 679 static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo; 680 681 static _LIBCPP_CONSTEXPR const bool traps = __base::traps; 682 static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before; 683 static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style; 684}; 685 686template <class _Tp> 687 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_specialized; 688template <class _Tp> 689 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits; 690template <class _Tp> 691 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits10; 692template <class _Tp> 693 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_digits10; 694template <class _Tp> 695 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_signed; 696template <class _Tp> 697 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_integer; 698template <class _Tp> 699 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_exact; 700template <class _Tp> 701 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::radix; 702template <class _Tp> 703 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent; 704template <class _Tp> 705 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent10; 706template <class _Tp> 707 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent; 708template <class _Tp> 709 _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent10; 710template <class _Tp> 711 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_infinity; 712template <class _Tp> 713 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_quiet_NaN; 714template <class _Tp> 715 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_signaling_NaN; 716template <class _Tp> 717 _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<volatile _Tp>::has_denorm; 718template <class _Tp> 719 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_denorm_loss; 720template <class _Tp> 721 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_iec559; 722template <class _Tp> 723 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_bounded; 724template <class _Tp> 725 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_modulo; 726template <class _Tp> 727 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::traps; 728template <class _Tp> 729 _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::tinyness_before; 730template <class _Tp> 731 _LIBCPP_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style; 732 733template <class _Tp> 734class _LIBCPP_TEMPLATE_VIS numeric_limits<const volatile _Tp> 735 : private numeric_limits<_Tp> 736{ 737 typedef numeric_limits<_Tp> __base; 738 typedef _Tp type; 739public: 740 static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized; 741 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();} 742 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();} 743 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();} 744 745 static _LIBCPP_CONSTEXPR const int digits = __base::digits; 746 static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10; 747 static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10; 748 static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed; 749 static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer; 750 static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact; 751 static _LIBCPP_CONSTEXPR const int radix = __base::radix; 752 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();} 753 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();} 754 755 static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent; 756 static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10; 757 static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent; 758 static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10; 759 760 static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity; 761 static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN; 762 static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN; 763 static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm; 764 static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss; 765 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();} 766 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();} 767 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();} 768 _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();} 769 770 static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559; 771 static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded; 772 static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo; 773 774 static _LIBCPP_CONSTEXPR const bool traps = __base::traps; 775 static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before; 776 static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style; 777}; 778 779template <class _Tp> 780 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_specialized; 781template <class _Tp> 782 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits; 783template <class _Tp> 784 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10; 785template <class _Tp> 786 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_digits10; 787template <class _Tp> 788 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed; 789template <class _Tp> 790 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_integer; 791template <class _Tp> 792 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_exact; 793template <class _Tp> 794 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::radix; 795template <class _Tp> 796 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent; 797template <class _Tp> 798 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent10; 799template <class _Tp> 800 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent; 801template <class _Tp> 802 _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent10; 803template <class _Tp> 804 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_infinity; 805template <class _Tp> 806 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_quiet_NaN; 807template <class _Tp> 808 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_signaling_NaN; 809template <class _Tp> 810 _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const volatile _Tp>::has_denorm; 811template <class _Tp> 812 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_denorm_loss; 813template <class _Tp> 814 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_iec559; 815template <class _Tp> 816 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_bounded; 817template <class _Tp> 818 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_modulo; 819template <class _Tp> 820 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::traps; 821template <class _Tp> 822 _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::tinyness_before; 823template <class _Tp> 824 _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const volatile _Tp>::round_style; 825 826_LIBCPP_END_NAMESPACE_STD 827 828_LIBCPP_POP_MACROS 829 830#endif // _LIBCPP_LIMITS 831