1227825Stheraven// -*- C++ -*- 2227825Stheraven//===---------------------------- limits ----------------------------------===// 3227825Stheraven// 4227825Stheraven// The LLVM Compiler Infrastructure 5227825Stheraven// 6227825Stheraven// This file is dual licensed under the MIT and the University of Illinois Open 7227825Stheraven// Source Licenses. See LICENSE.TXT for details. 8227825Stheraven// 9227825Stheraven//===----------------------------------------------------------------------===// 10227825Stheraven 11227825Stheraven#ifndef _LIBCPP_LIMITS 12227825Stheraven#define _LIBCPP_LIMITS 13227825Stheraven 14227825Stheraven/* 15227825Stheraven limits synopsis 16227825Stheraven 17227825Stheravennamespace std 18227825Stheraven{ 19227825Stheraven 20227825Stheraventemplate<class T> 21227825Stheravenclass numeric_limits 22227825Stheraven{ 23227825Stheravenpublic: 24227825Stheraven static constexpr bool is_specialized = false; 25227825Stheraven static constexpr T min() noexcept; 26227825Stheraven static constexpr T max() noexcept; 27227825Stheraven static constexpr T lowest() noexcept; 28227825Stheraven 29227825Stheraven static constexpr int digits = 0; 30227825Stheraven static constexpr int digits10 = 0; 31227825Stheraven static constexpr int max_digits10 = 0; 32227825Stheraven static constexpr bool is_signed = false; 33227825Stheraven static constexpr bool is_integer = false; 34227825Stheraven static constexpr bool is_exact = false; 35227825Stheraven static constexpr int radix = 0; 36227825Stheraven static constexpr T epsilon() noexcept; 37227825Stheraven static constexpr T round_error() noexcept; 38227825Stheraven 39227825Stheraven static constexpr int min_exponent = 0; 40227825Stheraven static constexpr int min_exponent10 = 0; 41227825Stheraven static constexpr int max_exponent = 0; 42227825Stheraven static constexpr int max_exponent10 = 0; 43227825Stheraven 44227825Stheraven static constexpr bool has_infinity = false; 45227825Stheraven static constexpr bool has_quiet_NaN = false; 46227825Stheraven static constexpr bool has_signaling_NaN = false; 47227825Stheraven static constexpr float_denorm_style has_denorm = denorm_absent; 48227825Stheraven static constexpr bool has_denorm_loss = false; 49227825Stheraven static constexpr T infinity() noexcept; 50227825Stheraven static constexpr T quiet_NaN() noexcept; 51227825Stheraven static constexpr T signaling_NaN() noexcept; 52227825Stheraven static constexpr T denorm_min() noexcept; 53227825Stheraven 54227825Stheraven static constexpr bool is_iec559 = false; 55227825Stheraven static constexpr bool is_bounded = false; 56227825Stheraven static constexpr bool is_modulo = false; 57227825Stheraven 58227825Stheraven static constexpr bool traps = false; 59227825Stheraven static constexpr bool tinyness_before = false; 60227825Stheraven static constexpr float_round_style round_style = round_toward_zero; 61227825Stheraven}; 62227825Stheraven 63227825Stheravenenum float_round_style 64227825Stheraven{ 65227825Stheraven round_indeterminate = -1, 66227825Stheraven round_toward_zero = 0, 67227825Stheraven round_to_nearest = 1, 68227825Stheraven round_toward_infinity = 2, 69227825Stheraven round_toward_neg_infinity = 3 70227825Stheraven}; 71227825Stheraven 72227825Stheravenenum float_denorm_style 73227825Stheraven{ 74227825Stheraven denorm_indeterminate = -1, 75227825Stheraven denorm_absent = 0, 76227825Stheraven denorm_present = 1 77227825Stheraven}; 78227825Stheraven 79227825Stheraventemplate<> class numeric_limits<cv bool>; 80227825Stheraven 81227825Stheraventemplate<> class numeric_limits<cv char>; 82227825Stheraventemplate<> class numeric_limits<cv signed char>; 83227825Stheraventemplate<> class numeric_limits<cv unsigned char>; 84227825Stheraventemplate<> class numeric_limits<cv wchar_t>; 85227825Stheraventemplate<> class numeric_limits<cv char16_t>; 86227825Stheraventemplate<> class numeric_limits<cv char32_t>; 87227825Stheraven 88227825Stheraventemplate<> class numeric_limits<cv short>; 89227825Stheraventemplate<> class numeric_limits<cv int>; 90227825Stheraventemplate<> class numeric_limits<cv long>; 91227825Stheraventemplate<> class numeric_limits<cv long long>; 92227825Stheraventemplate<> class numeric_limits<cv unsigned short>; 93227825Stheraventemplate<> class numeric_limits<cv unsigned int>; 94227825Stheraventemplate<> class numeric_limits<cv unsigned long>; 95227825Stheraventemplate<> class numeric_limits<cv unsigned long long>; 96227825Stheraven 97227825Stheraventemplate<> class numeric_limits<cv float>; 98227825Stheraventemplate<> class numeric_limits<cv double>; 99227825Stheraventemplate<> class numeric_limits<cv long double>; 100227825Stheraven 101227825Stheraven} // std 102227825Stheraven 103227825Stheraven*/ 104227825Stheraven 105227825Stheraven#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER) 106227825Stheraven#pragma GCC system_header 107227825Stheraven#endif 108227825Stheraven 109227825Stheraven#include <__config> 110227825Stheraven#include <type_traits> 111227825Stheraven 112227825Stheraven#include <__undef_min_max> 113227825Stheraven 114227825Stheraven#if defined(_LIBCPP_MSVCRT) 115227825Stheraven#include "support/win32/limits_win32.h" 116227825Stheraven#endif // _LIBCPP_MSVCRT 117227825Stheraven 118227825Stheraven#if defined(__IBMCPP__) 119227825Stheraven#include "support/ibm/limits.h" 120227825Stheraven#endif // __IBMCPP__ 121227825Stheraven 122227825Stheraven_LIBCPP_BEGIN_NAMESPACE_STD 123227825Stheraven 124227825Stheravenenum float_round_style 125227825Stheraven{ 126227825Stheraven round_indeterminate = -1, 127227825Stheraven round_toward_zero = 0, 128227825Stheraven round_to_nearest = 1, 129227825Stheraven round_toward_infinity = 2, 130227825Stheraven round_toward_neg_infinity = 3 131227825Stheraven}; 132227825Stheraven 133227825Stheravenenum float_denorm_style 134227825Stheraven{ 135227825Stheraven denorm_indeterminate = -1, 136227825Stheraven denorm_absent = 0, 137227825Stheraven denorm_present = 1 138227825Stheraven}; 139227825Stheraven 140227825Stheraventemplate <class _Tp, bool = is_arithmetic<_Tp>::value> 141227825Stheravenclass __libcpp_numeric_limits 142227825Stheraven{ 143227825Stheravenprotected: 144227825Stheraven typedef _Tp type; 145227825Stheraven 146227825Stheraven static _LIBCPP_CONSTEXPR const bool is_specialized = false; 147227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return type();} 148227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return type();} 149227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return type();} 150227825Stheraven 151227825Stheraven static _LIBCPP_CONSTEXPR const int digits = 0; 152227825Stheraven static _LIBCPP_CONSTEXPR const int digits10 = 0; 153227825Stheraven static _LIBCPP_CONSTEXPR const int max_digits10 = 0; 154227825Stheraven static _LIBCPP_CONSTEXPR const bool is_signed = false; 155227825Stheraven static _LIBCPP_CONSTEXPR const bool is_integer = false; 156227825Stheraven static _LIBCPP_CONSTEXPR const bool is_exact = false; 157227825Stheraven static _LIBCPP_CONSTEXPR const int radix = 0; 158227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type();} 159227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type();} 160227825Stheraven 161227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent = 0; 162227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent10 = 0; 163227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent = 0; 164227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent10 = 0; 165227825Stheraven 166227825Stheraven static _LIBCPP_CONSTEXPR const bool has_infinity = false; 167227825Stheraven static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false; 168227825Stheraven static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false; 169227825Stheraven static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent; 170227825Stheraven static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 171227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type();} 172227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type();} 173227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type();} 174227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type();} 175227825Stheraven 176227825Stheraven static _LIBCPP_CONSTEXPR const bool is_iec559 = false; 177227825Stheraven static _LIBCPP_CONSTEXPR const bool is_bounded = false; 178227825Stheraven static _LIBCPP_CONSTEXPR const bool is_modulo = false; 179227825Stheraven 180227825Stheraven static _LIBCPP_CONSTEXPR const bool traps = false; 181227825Stheraven static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 182227825Stheraven static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero; 183227825Stheraven}; 184227825Stheraven 185227825Stheraventemplate <class _Tp, int digits, bool is_signed> 186227825Stheravenstruct __libcpp_compute_min 187227825Stheraven{ 188227825Stheraven static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << digits); 189227825Stheraven}; 190227825Stheraven 191227825Stheraventemplate <class _Tp, int digits> 192227825Stheravenstruct __libcpp_compute_min<_Tp, digits, false> 193227825Stheraven{ 194227825Stheraven static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0); 195227825Stheraven}; 196227825Stheraven 197227825Stheraventemplate <class _Tp> 198227825Stheravenclass __libcpp_numeric_limits<_Tp, true> 199227825Stheraven{ 200227825Stheravenprotected: 201227825Stheraven typedef _Tp type; 202227825Stheraven 203227825Stheraven static _LIBCPP_CONSTEXPR const bool is_specialized = true; 204227825Stheraven 205227825Stheraven static _LIBCPP_CONSTEXPR const bool is_signed = type(-1) < type(0); 206288943Sdim static _LIBCPP_CONSTEXPR const int digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed); 207227825Stheraven static _LIBCPP_CONSTEXPR const int digits10 = digits * 3 / 10; 208227825Stheraven static _LIBCPP_CONSTEXPR const int max_digits10 = 0; 209227825Stheraven static _LIBCPP_CONSTEXPR const type __min = __libcpp_compute_min<type, digits, is_signed>::value; 210261272Sdim static _LIBCPP_CONSTEXPR const type __max = is_signed ? type(type(~0) ^ __min) : type(~0); 211261272Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;} 212261272Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;} 213261272Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();} 214227825Stheraven 215261272Sdim static _LIBCPP_CONSTEXPR const bool is_integer = true; 216227825Stheraven static _LIBCPP_CONSTEXPR const bool is_exact = true; 217288943Sdim static _LIBCPP_CONSTEXPR const int radix = 2; 218227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);} 219288943Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);} 220227825Stheraven 221227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent = 0; 222227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent10 = 0; 223227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent = 0; 224227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent10 = 0; 225288943Sdim 226288943Sdim static _LIBCPP_CONSTEXPR const bool has_infinity = false; 227232924Stheraven static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false; 228227825Stheraven static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false; 229227825Stheraven static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent; 230227825Stheraven static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 231227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);} 232227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);} 233227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);} 234227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);} 235227825Stheraven 236227825Stheraven static _LIBCPP_CONSTEXPR const bool is_iec559 = false; 237227825Stheraven static _LIBCPP_CONSTEXPR const bool is_bounded = true; 238227825Stheraven static _LIBCPP_CONSTEXPR const bool is_modulo = !_VSTD::is_signed<_Tp>::value; 239227825Stheraven 240227825Stheraven#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || \ 241227825Stheraven defined(__wasm__) 242227825Stheraven static _LIBCPP_CONSTEXPR const bool traps = true; 243227825Stheraven#else 244227825Stheraven static _LIBCPP_CONSTEXPR const bool traps = false; 245227825Stheraven#endif 246227825Stheraven static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 247227825Stheraven static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero; 248227825Stheraven}; 249227825Stheraven 250227825Stheraventemplate <> 251227825Stheravenclass __libcpp_numeric_limits<bool, true> 252227825Stheraven{ 253227825Stheravenprotected: 254227825Stheraven typedef bool type; 255227825Stheraven 256227825Stheraven static _LIBCPP_CONSTEXPR const bool is_specialized = true; 257227825Stheraven 258227825Stheraven static _LIBCPP_CONSTEXPR const bool is_signed = false; 259288943Sdim static _LIBCPP_CONSTEXPR const int digits = 1; 260288943Sdim static _LIBCPP_CONSTEXPR const int digits10 = 0; 261232924Stheraven static _LIBCPP_CONSTEXPR const int max_digits10 = 0; 262227825Stheraven static _LIBCPP_CONSTEXPR const type __min = false; 263227825Stheraven static _LIBCPP_CONSTEXPR const type __max = true; 264227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __min;} 265227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __max;} 266227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return min();} 267227825Stheraven 268227825Stheraven static _LIBCPP_CONSTEXPR const bool is_integer = true; 269227825Stheraven static _LIBCPP_CONSTEXPR const bool is_exact = true; 270227825Stheraven static _LIBCPP_CONSTEXPR const int radix = 2; 271227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return type(0);} 272227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return type(0);} 273227825Stheraven 274227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent = 0; 275227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent10 = 0; 276227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent = 0; 277227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent10 = 0; 278227825Stheraven 279227825Stheraven static _LIBCPP_CONSTEXPR const bool has_infinity = false; 280227825Stheraven static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false; 281227825Stheraven static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false; 282227825Stheraven static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent; 283227825Stheraven static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 284227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return type(0);} 285227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return type(0);} 286227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return type(0);} 287227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return type(0);} 288227825Stheraven 289227825Stheraven static _LIBCPP_CONSTEXPR const bool is_iec559 = false; 290227825Stheraven static _LIBCPP_CONSTEXPR const bool is_bounded = true; 291227825Stheraven static _LIBCPP_CONSTEXPR const bool is_modulo = false; 292227825Stheraven 293227825Stheraven static _LIBCPP_CONSTEXPR const bool traps = false; 294227825Stheraven static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 295227825Stheraven static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero; 296227825Stheraven}; 297227825Stheraven 298227825Stheraventemplate <> 299227825Stheravenclass __libcpp_numeric_limits<float, true> 300227825Stheraven{ 301227825Stheravenprotected: 302227825Stheraven typedef float type; 303227825Stheraven 304227825Stheraven static _LIBCPP_CONSTEXPR const bool is_specialized = true; 305227825Stheraven 306227825Stheraven static _LIBCPP_CONSTEXPR const bool is_signed = true; 307227825Stheraven static _LIBCPP_CONSTEXPR const int digits = __FLT_MANT_DIG__; 308227825Stheraven static _LIBCPP_CONSTEXPR const int digits10 = __FLT_DIG__; 309227825Stheraven static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103)/100000; 310227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __FLT_MIN__;} 311227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __FLT_MAX__;} 312227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();} 313227825Stheraven 314227825Stheraven static _LIBCPP_CONSTEXPR const bool is_integer = false; 315227825Stheraven static _LIBCPP_CONSTEXPR const bool is_exact = false; 316227825Stheraven static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__; 317227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __FLT_EPSILON__;} 318227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5F;} 319227825Stheraven 320227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent = __FLT_MIN_EXP__; 321227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent10 = __FLT_MIN_10_EXP__; 322227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent = __FLT_MAX_EXP__; 323227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent10 = __FLT_MAX_10_EXP__; 324227825Stheraven 325227825Stheraven static _LIBCPP_CONSTEXPR const bool has_infinity = true; 326227825Stheraven static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true; 327227825Stheraven static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true; 328227825Stheraven static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present; 329227825Stheraven static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 330227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_valf();} 331227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanf("");} 332227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansf("");} 333227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __FLT_DENORM_MIN__;} 334227825Stheraven 335227825Stheraven static _LIBCPP_CONSTEXPR const bool is_iec559 = true; 336227825Stheraven static _LIBCPP_CONSTEXPR const bool is_bounded = true; 337227825Stheraven static _LIBCPP_CONSTEXPR const bool is_modulo = false; 338227825Stheraven 339227825Stheraven static _LIBCPP_CONSTEXPR const bool traps = false; 340227825Stheraven static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 341227825Stheraven static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest; 342227825Stheraven}; 343227825Stheraven 344227825Stheraventemplate <> 345227825Stheravenclass __libcpp_numeric_limits<double, true> 346227825Stheraven{ 347227825Stheravenprotected: 348227825Stheraven typedef double type; 349227825Stheraven 350227825Stheraven static _LIBCPP_CONSTEXPR const bool is_specialized = true; 351227825Stheraven 352227825Stheraven static _LIBCPP_CONSTEXPR const bool is_signed = true; 353227825Stheraven static _LIBCPP_CONSTEXPR const int digits = __DBL_MANT_DIG__; 354227825Stheraven static _LIBCPP_CONSTEXPR const int digits10 = __DBL_DIG__; 355227825Stheraven static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103)/100000; 356227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __DBL_MIN__;} 357227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __DBL_MAX__;} 358227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();} 359227825Stheraven 360227825Stheraven static _LIBCPP_CONSTEXPR const bool is_integer = false; 361227825Stheraven static _LIBCPP_CONSTEXPR const bool is_exact = false; 362227825Stheraven static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__; 363227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __DBL_EPSILON__;} 364227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5;} 365227825Stheraven 366227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent = __DBL_MIN_EXP__; 367261272Sdim static _LIBCPP_CONSTEXPR const int min_exponent10 = __DBL_MIN_10_EXP__; 368227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent = __DBL_MAX_EXP__; 369227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent10 = __DBL_MAX_10_EXP__; 370227825Stheraven 371227825Stheraven static _LIBCPP_CONSTEXPR const bool has_infinity = true; 372227825Stheraven static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true; 373227825Stheraven static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true; 374227825Stheraven static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present; 375227825Stheraven static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 376227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_val();} 377227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nan("");} 378300770Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nans("");} 379300770Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __DBL_DENORM_MIN__;} 380227825Stheraven 381227825Stheraven static _LIBCPP_CONSTEXPR const bool is_iec559 = true; 382227825Stheraven static _LIBCPP_CONSTEXPR const bool is_bounded = true; 383227825Stheraven static _LIBCPP_CONSTEXPR const bool is_modulo = false; 384227825Stheraven 385227825Stheraven static _LIBCPP_CONSTEXPR const bool traps = false; 386227825Stheraven static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 387227825Stheraven static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest; 388227825Stheraven}; 389227825Stheraven 390227825Stheraventemplate <> 391227825Stheravenclass __libcpp_numeric_limits<long double, true> 392227825Stheraven{ 393227825Stheravenprotected: 394227825Stheraven typedef long double type; 395227825Stheraven 396227825Stheraven static _LIBCPP_CONSTEXPR const bool is_specialized = true; 397227825Stheraven 398227825Stheraven static _LIBCPP_CONSTEXPR const bool is_signed = true; 399227825Stheraven static _LIBCPP_CONSTEXPR const int digits = __LDBL_MANT_DIG__; 400227825Stheraven static _LIBCPP_CONSTEXPR const int digits10 = __LDBL_DIG__; 401227825Stheraven static _LIBCPP_CONSTEXPR const int max_digits10 = 2+(digits * 30103)/100000; 402227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __LDBL_MIN__;} 403227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __LDBL_MAX__;} 404261272Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return -max();} 405261272Sdim 406261272Sdim static _LIBCPP_CONSTEXPR const bool is_integer = false; 407261272Sdim static _LIBCPP_CONSTEXPR const bool is_exact = false; 408261272Sdim static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__; 409227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __LDBL_EPSILON__;} 410227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return 0.5;} 411227825Stheraven 412261272Sdim static _LIBCPP_CONSTEXPR const int min_exponent = __LDBL_MIN_EXP__; 413227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent10 = __LDBL_MIN_10_EXP__; 414227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent = __LDBL_MAX_EXP__; 415227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent10 = __LDBL_MAX_10_EXP__; 416227825Stheraven 417227825Stheraven static _LIBCPP_CONSTEXPR const bool has_infinity = true; 418227825Stheraven static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true; 419227825Stheraven static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true; 420227825Stheraven static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present; 421227825Stheraven static _LIBCPP_CONSTEXPR const bool has_denorm_loss = false; 422227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __builtin_huge_vall();} 423300770Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __builtin_nanl("");} 424300770Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __builtin_nansl("");} 425227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __LDBL_DENORM_MIN__;} 426227825Stheraven 427227825Stheraven#if (defined(__ppc__) || defined(__ppc64__)) 428227825Stheraven static _LIBCPP_CONSTEXPR const bool is_iec559 = false; 429227825Stheraven#else 430227825Stheraven static _LIBCPP_CONSTEXPR const bool is_iec559 = true; 431227825Stheraven#endif 432227825Stheraven static _LIBCPP_CONSTEXPR const bool is_bounded = true; 433227825Stheraven static _LIBCPP_CONSTEXPR const bool is_modulo = false; 434227825Stheraven 435227825Stheraven static _LIBCPP_CONSTEXPR const bool traps = false; 436227825Stheraven static _LIBCPP_CONSTEXPR const bool tinyness_before = false; 437227825Stheraven static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest; 438227825Stheraven}; 439227825Stheraven 440227825Stheraventemplate <class _Tp> 441227825Stheravenclass _LIBCPP_TYPE_VIS_ONLY numeric_limits 442227825Stheraven : private __libcpp_numeric_limits<typename remove_cv<_Tp>::type> 443227825Stheraven{ 444227825Stheraven typedef __libcpp_numeric_limits<typename remove_cv<_Tp>::type> __base; 445227825Stheraven typedef typename __base::type type; 446227825Stheravenpublic: 447227825Stheraven static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized; 448227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();} 449227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();} 450227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();} 451227825Stheraven 452227825Stheraven static _LIBCPP_CONSTEXPR const int digits = __base::digits; 453227825Stheraven static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10; 454227825Stheraven static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10; 455227825Stheraven static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed; 456227825Stheraven static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer; 457261272Sdim static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact; 458261272Sdim static _LIBCPP_CONSTEXPR const int radix = __base::radix; 459261272Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();} 460261272Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();} 461227825Stheraven 462227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent; 463227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10; 464227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent; 465261272Sdim static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10; 466227825Stheraven 467227825Stheraven static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity; 468227825Stheraven static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN; 469227825Stheraven static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN; 470227825Stheraven static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm; 471227825Stheraven static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss; 472227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();} 473227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();} 474227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();} 475227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();} 476227825Stheraven 477227825Stheraven static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559; 478227825Stheraven static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded; 479227825Stheraven static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo; 480227825Stheraven 481227825Stheraven static _LIBCPP_CONSTEXPR const bool traps = __base::traps; 482227825Stheraven static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before; 483288943Sdim static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style; 484227825Stheraven}; 485227825Stheraven 486227825Stheraventemplate <class _Tp> 487227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized; 488227825Stheraventemplate <class _Tp> 489227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits; 490227825Stheraventemplate <class _Tp> 491227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits10; 492227825Stheraventemplate <class _Tp> 493227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_digits10; 494227825Stheraventemplate <class _Tp> 495232924Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_signed; 496232924Stheraventemplate <class _Tp> 497227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_integer; 498227825Stheraventemplate <class _Tp> 499227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_exact; 500227825Stheraventemplate <class _Tp> 501227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::radix; 502227825Stheraventemplate <class _Tp> 503227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent; 504227825Stheraventemplate <class _Tp> 505227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10; 506227825Stheraventemplate <class _Tp> 507227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent; 508227825Stheraventemplate <class _Tp> 509227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10; 510227825Stheraventemplate <class _Tp> 511227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity; 512227825Stheraventemplate <class _Tp> 513227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN; 514227825Stheraventemplate <class _Tp> 515227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN; 516227825Stheraventemplate <class _Tp> 517227825Stheraven _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm; 518227825Stheraventemplate <class _Tp> 519227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss; 520227825Stheraventemplate <class _Tp> 521227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559; 522227825Stheraventemplate <class _Tp> 523227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded; 524227825Stheraventemplate <class _Tp> 525227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo; 526227825Stheraventemplate <class _Tp> 527227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::traps; 528227825Stheraventemplate <class _Tp> 529227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before; 530227825Stheraventemplate <class _Tp> 531227825Stheraven _LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style; 532227825Stheraven 533227825Stheraventemplate <class _Tp> 534227825Stheravenclass _LIBCPP_TYPE_VIS_ONLY numeric_limits<const _Tp> 535227825Stheraven : private numeric_limits<_Tp> 536227825Stheraven{ 537227825Stheraven typedef numeric_limits<_Tp> __base; 538227825Stheraven typedef _Tp type; 539227825Stheravenpublic: 540227825Stheraven static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized; 541227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();} 542227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();} 543227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();} 544227825Stheraven 545227825Stheraven static _LIBCPP_CONSTEXPR const int digits = __base::digits; 546227825Stheraven static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10; 547227825Stheraven static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10; 548227825Stheraven static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed; 549227825Stheraven static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer; 550227825Stheraven static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact; 551227825Stheraven static _LIBCPP_CONSTEXPR const int radix = __base::radix; 552227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();} 553227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();} 554227825Stheraven 555227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent; 556227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10; 557227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent; 558227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10; 559227825Stheraven 560227825Stheraven static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity; 561227825Stheraven static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN; 562227825Stheraven static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN; 563227825Stheraven static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm; 564227825Stheraven static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss; 565227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();} 566227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();} 567227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();} 568227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();} 569227825Stheraven 570227825Stheraven static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559; 571227825Stheraven static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded; 572227825Stheraven static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo; 573227825Stheraven 574227825Stheraven static _LIBCPP_CONSTEXPR const bool traps = __base::traps; 575227825Stheraven static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before; 576227825Stheraven static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style; 577227825Stheraven}; 578227825Stheraven 579227825Stheraventemplate <class _Tp> 580227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_specialized; 581227825Stheraventemplate <class _Tp> 582227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits; 583227825Stheraventemplate <class _Tp> 584227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits10; 585227825Stheraventemplate <class _Tp> 586227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_digits10; 587227825Stheraventemplate <class _Tp> 588227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_signed; 589227825Stheraventemplate <class _Tp> 590227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_integer; 591227825Stheraventemplate <class _Tp> 592227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_exact; 593227825Stheraventemplate <class _Tp> 594227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::radix; 595227825Stheraventemplate <class _Tp> 596227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent; 597227825Stheraventemplate <class _Tp> 598227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent10; 599227825Stheraventemplate <class _Tp> 600227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent; 601227825Stheraventemplate <class _Tp> 602227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent10; 603227825Stheraventemplate <class _Tp> 604227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_infinity; 605227825Stheraventemplate <class _Tp> 606227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_quiet_NaN; 607227825Stheraventemplate <class _Tp> 608227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_signaling_NaN; 609227825Stheraventemplate <class _Tp> 610227825Stheraven _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const _Tp>::has_denorm; 611227825Stheraventemplate <class _Tp> 612227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_denorm_loss; 613227825Stheraventemplate <class _Tp> 614227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_iec559; 615227825Stheraventemplate <class _Tp> 616227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_bounded; 617227825Stheraventemplate <class _Tp> 618227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_modulo; 619227825Stheraventemplate <class _Tp> 620227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::traps; 621227825Stheraventemplate <class _Tp> 622227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::tinyness_before; 623227825Stheraventemplate <class _Tp> 624227825Stheraven _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style; 625227825Stheraven 626227825Stheraventemplate <class _Tp> 627227825Stheravenclass _LIBCPP_TYPE_VIS_ONLY numeric_limits<volatile _Tp> 628227825Stheraven : private numeric_limits<_Tp> 629227825Stheraven{ 630227825Stheraven typedef numeric_limits<_Tp> __base; 631227825Stheraven typedef _Tp type; 632227825Stheravenpublic: 633227825Stheraven static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized; 634227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();} 635227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();} 636227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();} 637227825Stheraven 638227825Stheraven static _LIBCPP_CONSTEXPR const int digits = __base::digits; 639227825Stheraven static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10; 640227825Stheraven static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10; 641227825Stheraven static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed; 642227825Stheraven static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer; 643227825Stheraven static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact; 644227825Stheraven static _LIBCPP_CONSTEXPR const int radix = __base::radix; 645227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();} 646227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();} 647227825Stheraven 648227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent; 649227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10; 650227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent; 651227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10; 652227825Stheraven 653227825Stheraven static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity; 654227825Stheraven static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN; 655227825Stheraven static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN; 656227825Stheraven static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm; 657227825Stheraven static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss; 658227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();} 659227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();} 660227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();} 661227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();} 662227825Stheraven 663227825Stheraven static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559; 664227825Stheraven static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded; 665227825Stheraven static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo; 666227825Stheraven 667232924Stheraven static _LIBCPP_CONSTEXPR const bool traps = __base::traps; 668227825Stheraven static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before; 669227825Stheraven static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style; 670227825Stheraven}; 671227825Stheraven 672300770Sdimtemplate <class _Tp> 673227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_specialized; 674227825Stheraventemplate <class _Tp> 675227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits; 676227825Stheraventemplate <class _Tp> 677227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits10; 678227825Stheraventemplate <class _Tp> 679227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_digits10; 680227825Stheraventemplate <class _Tp> 681227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_signed; 682227825Stheraventemplate <class _Tp> 683227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_integer; 684227825Stheraventemplate <class _Tp> 685227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_exact; 686227825Stheraventemplate <class _Tp> 687227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::radix; 688227825Stheraventemplate <class _Tp> 689227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent; 690227825Stheraventemplate <class _Tp> 691227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent10; 692227825Stheraventemplate <class _Tp> 693227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent; 694227825Stheraventemplate <class _Tp> 695227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent10; 696227825Stheraventemplate <class _Tp> 697227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_infinity; 698227825Stheraventemplate <class _Tp> 699227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_quiet_NaN; 700227825Stheraventemplate <class _Tp> 701227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_signaling_NaN; 702227825Stheraventemplate <class _Tp> 703227825Stheraven _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<volatile _Tp>::has_denorm; 704227825Stheraventemplate <class _Tp> 705227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_denorm_loss; 706227825Stheraventemplate <class _Tp> 707227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_iec559; 708227825Stheraventemplate <class _Tp> 709227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_bounded; 710227825Stheraventemplate <class _Tp> 711227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_modulo; 712227825Stheraventemplate <class _Tp> 713227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::traps; 714227825Stheraventemplate <class _Tp> 715227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::tinyness_before; 716227825Stheraventemplate <class _Tp> 717227825Stheraven _LIBCPP_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style; 718227825Stheraven 719227825Stheraventemplate <class _Tp> 720227825Stheravenclass _LIBCPP_TYPE_VIS_ONLY numeric_limits<const volatile _Tp> 721227825Stheraven : private numeric_limits<_Tp> 722227825Stheraven{ 723227825Stheraven typedef numeric_limits<_Tp> __base; 724227825Stheraven typedef _Tp type; 725227825Stheravenpublic: 726227825Stheraven static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized; 727227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type min() _NOEXCEPT {return __base::min();} 728227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type max() _NOEXCEPT {return __base::max();} 729227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT {return __base::lowest();} 730227825Stheraven 731227825Stheraven static _LIBCPP_CONSTEXPR const int digits = __base::digits; 732227825Stheraven static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10; 733227825Stheraven static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10; 734227825Stheraven static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed; 735227825Stheraven static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer; 736227825Stheraven static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact; 737227825Stheraven static _LIBCPP_CONSTEXPR const int radix = __base::radix; 738261272Sdim _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT {return __base::epsilon();} 739227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT {return __base::round_error();} 740227825Stheraven 741227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent; 742227825Stheraven static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10; 743227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent; 744227825Stheraven static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10; 745227825Stheraven 746227825Stheraven static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity; 747227825Stheraven static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN; 748227825Stheraven static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN; 749227825Stheraven static _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm; 750227825Stheraven static _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss; 751227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT {return __base::infinity();} 752227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT {return __base::quiet_NaN();} 753227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT {return __base::signaling_NaN();} 754227825Stheraven _LIBCPP_INLINE_VISIBILITY static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT {return __base::denorm_min();} 755227825Stheraven 756288943Sdim static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559; 757227825Stheraven static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded; 758227825Stheraven static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo; 759227825Stheraven 760227825Stheraven static _LIBCPP_CONSTEXPR const bool traps = __base::traps; 761227825Stheraven static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before; 762227825Stheraven static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style; 763227825Stheraven}; 764227825Stheraven 765227825Stheraventemplate <class _Tp> 766232924Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_specialized; 767232924Stheraventemplate <class _Tp> 768227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits; 769227825Stheraventemplate <class _Tp> 770227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10; 771227825Stheraventemplate <class _Tp> 772227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_digits10; 773227825Stheraventemplate <class _Tp> 774227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed; 775227825Stheraventemplate <class _Tp> 776227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_integer; 777227825Stheraventemplate <class _Tp> 778227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_exact; 779227825Stheraventemplate <class _Tp> 780227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::radix; 781227825Stheraventemplate <class _Tp> 782227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent; 783227825Stheraventemplate <class _Tp> 784227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent10; 785227825Stheraventemplate <class _Tp> 786227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent; 787227825Stheraventemplate <class _Tp> 788227825Stheraven _LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent10; 789227825Stheraventemplate <class _Tp> 790227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_infinity; 791227825Stheraventemplate <class _Tp> 792227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_quiet_NaN; 793227825Stheraventemplate <class _Tp> 794227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_signaling_NaN; 795227825Stheraventemplate <class _Tp> 796227825Stheraven _LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const volatile _Tp>::has_denorm; 797227825Stheraventemplate <class _Tp> 798227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_denorm_loss; 799227825Stheraventemplate <class _Tp> 800227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_iec559; 801227825Stheraventemplate <class _Tp> 802227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_bounded; 803227825Stheraventemplate <class _Tp> 804227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_modulo; 805227825Stheraventemplate <class _Tp> 806227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::traps; 807227825Stheraventemplate <class _Tp> 808227825Stheraven _LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::tinyness_before; 809227825Stheraventemplate <class _Tp> 810227825Stheraven _LIBCPP_CONSTEXPR const float_round_style numeric_limits<const volatile _Tp>::round_style; 811227825Stheraven 812227825Stheraven_LIBCPP_END_NAMESPACE_STD 813227825Stheraven 814227825Stheraven#endif // _LIBCPP_LIMITS 815227825Stheraven