2010-05-11 19:42:16 +00:00
|
|
|
// -*- C++ -*-
|
2021-11-17 21:25:01 +00:00
|
|
|
//===----------------------------------------------------------------------===//
|
2010-05-11 19:42:16 +00:00
|
|
|
//
|
2019-01-19 10:56:40 +00:00
|
|
|
// Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
|
|
|
|
// See https://llvm.org/LICENSE.txt for license information.
|
|
|
|
// SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
|
2010-05-11 19:42:16 +00:00
|
|
|
//
|
|
|
|
//===----------------------------------------------------------------------===//
|
|
|
|
|
|
|
|
#ifndef _LIBCPP_LIMITS
|
|
|
|
#define _LIBCPP_LIMITS
|
|
|
|
|
|
|
|
/*
|
|
|
|
limits synopsis
|
|
|
|
|
|
|
|
namespace std
|
|
|
|
{
|
|
|
|
|
|
|
|
template<class T>
|
|
|
|
class numeric_limits
|
|
|
|
{
|
|
|
|
public:
|
2012-04-02 19:23:15 +00:00
|
|
|
static constexpr bool is_specialized = false;
|
|
|
|
static constexpr T min() noexcept;
|
|
|
|
static constexpr T max() noexcept;
|
|
|
|
static constexpr T lowest() noexcept;
|
|
|
|
|
|
|
|
static constexpr int digits = 0;
|
|
|
|
static constexpr int digits10 = 0;
|
|
|
|
static constexpr int max_digits10 = 0;
|
|
|
|
static constexpr bool is_signed = false;
|
|
|
|
static constexpr bool is_integer = false;
|
|
|
|
static constexpr bool is_exact = false;
|
|
|
|
static constexpr int radix = 0;
|
|
|
|
static constexpr T epsilon() noexcept;
|
|
|
|
static constexpr T round_error() noexcept;
|
|
|
|
|
|
|
|
static constexpr int min_exponent = 0;
|
|
|
|
static constexpr int min_exponent10 = 0;
|
|
|
|
static constexpr int max_exponent = 0;
|
|
|
|
static constexpr int max_exponent10 = 0;
|
|
|
|
|
|
|
|
static constexpr bool has_infinity = false;
|
|
|
|
static constexpr bool has_quiet_NaN = false;
|
|
|
|
static constexpr bool has_signaling_NaN = false;
|
2023-09-25 07:27:11 +00:00
|
|
|
static constexpr float_denorm_style has_denorm = denorm_absent; // deprecated in C++23
|
|
|
|
static constexpr bool has_denorm_loss = false; // deprecated in C++23
|
2012-04-02 19:23:15 +00:00
|
|
|
static constexpr T infinity() noexcept;
|
|
|
|
static constexpr T quiet_NaN() noexcept;
|
|
|
|
static constexpr T signaling_NaN() noexcept;
|
|
|
|
static constexpr T denorm_min() noexcept;
|
|
|
|
|
|
|
|
static constexpr bool is_iec559 = false;
|
|
|
|
static constexpr bool is_bounded = false;
|
|
|
|
static constexpr bool is_modulo = false;
|
|
|
|
|
|
|
|
static constexpr bool traps = false;
|
|
|
|
static constexpr bool tinyness_before = false;
|
|
|
|
static constexpr float_round_style round_style = round_toward_zero;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
enum float_round_style
|
|
|
|
{
|
|
|
|
round_indeterminate = -1,
|
|
|
|
round_toward_zero = 0,
|
|
|
|
round_to_nearest = 1,
|
|
|
|
round_toward_infinity = 2,
|
|
|
|
round_toward_neg_infinity = 3
|
|
|
|
};
|
|
|
|
|
2023-09-25 07:27:11 +00:00
|
|
|
enum float_denorm_style // deprecated in C++23
|
2010-05-11 19:42:16 +00:00
|
|
|
{
|
|
|
|
denorm_indeterminate = -1,
|
|
|
|
denorm_absent = 0,
|
|
|
|
denorm_present = 1
|
|
|
|
};
|
|
|
|
|
|
|
|
template<> class numeric_limits<cv bool>;
|
|
|
|
|
|
|
|
template<> class numeric_limits<cv char>;
|
|
|
|
template<> class numeric_limits<cv signed char>;
|
|
|
|
template<> class numeric_limits<cv unsigned char>;
|
|
|
|
template<> class numeric_limits<cv wchar_t>;
|
2018-11-29 23:21:18 +00:00
|
|
|
template<> class numeric_limits<cv char8_t>; // C++20
|
2010-05-11 19:42:16 +00:00
|
|
|
template<> class numeric_limits<cv char16_t>;
|
|
|
|
template<> class numeric_limits<cv char32_t>;
|
|
|
|
|
|
|
|
template<> class numeric_limits<cv short>;
|
|
|
|
template<> class numeric_limits<cv int>;
|
|
|
|
template<> class numeric_limits<cv long>;
|
|
|
|
template<> class numeric_limits<cv long long>;
|
|
|
|
template<> class numeric_limits<cv unsigned short>;
|
|
|
|
template<> class numeric_limits<cv unsigned int>;
|
|
|
|
template<> class numeric_limits<cv unsigned long>;
|
|
|
|
template<> class numeric_limits<cv unsigned long long>;
|
|
|
|
|
|
|
|
template<> class numeric_limits<cv float>;
|
|
|
|
template<> class numeric_limits<cv double>;
|
|
|
|
template<> class numeric_limits<cv long double>;
|
|
|
|
|
|
|
|
} // std
|
|
|
|
|
|
|
|
*/
|
2022-03-25 16:55:36 +00:00
|
|
|
|
|
|
|
#include <__assert> // all public C++ headers provide the assertion handler
|
2017-04-11 14:06:39 +00:00
|
|
|
#include <__config>
|
2022-12-20 18:47:35 +00:00
|
|
|
#include <__type_traits/is_arithmetic.h>
|
|
|
|
#include <__type_traits/is_signed.h>
|
|
|
|
#include <__type_traits/remove_cv.h>
|
2010-05-11 19:42:16 +00:00
|
|
|
|
2017-05-31 22:07:49 +00:00
|
|
|
#if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
|
2022-02-02 01:16:40 +00:00
|
|
|
# pragma GCC system_header
|
2017-05-31 22:07:49 +00:00
|
|
|
#endif
|
|
|
|
|
|
|
|
_LIBCPP_PUSH_MACROS
|
|
|
|
#include <__undef_macros>
|
2018-12-11 04:35:44 +00:00
|
|
|
#include <version>
|
2017-05-31 22:07:49 +00:00
|
|
|
|
2010-05-11 19:42:16 +00:00
|
|
|
_LIBCPP_BEGIN_NAMESPACE_STD
|
|
|
|
|
|
|
|
enum float_round_style {
|
|
|
|
round_indeterminate = -1,
|
|
|
|
round_toward_zero = 0,
|
|
|
|
round_to_nearest = 1,
|
|
|
|
round_toward_infinity = 2,
|
|
|
|
round_toward_neg_infinity = 3
|
|
|
|
};
|
|
|
|
|
2023-09-25 07:27:11 +00:00
|
|
|
enum _LIBCPP_DEPRECATED_IN_CXX23 float_denorm_style {
|
2010-05-11 19:42:16 +00:00
|
|
|
denorm_indeterminate = -1,
|
|
|
|
denorm_absent = 0,
|
|
|
|
denorm_present = 1
|
|
|
|
};
|
|
|
|
|
|
|
|
template <class _Tp, bool = is_arithmetic<_Tp>::value>
|
|
|
|
class __libcpp_numeric_limits {
|
|
|
|
protected:
|
|
|
|
typedef _Tp type;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_specialized = false;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return type(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return type(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return type(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int digits = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits10 = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_signed = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const int radix = 0;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return type(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return type(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
|
2023-09-25 07:27:11 +00:00
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return type(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return type(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return type(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return type(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_bounded = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
2017-06-01 02:29:37 +00:00
|
|
|
template <class _Tp, int __digits, bool _IsSigned>
|
2010-05-11 19:42:16 +00:00
|
|
|
struct __libcpp_compute_min {
|
2017-06-01 02:29:37 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const _Tp value = _Tp(_Tp(1) << __digits);
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
2017-06-01 02:29:37 +00:00
|
|
|
template <class _Tp, int __digits>
|
|
|
|
struct __libcpp_compute_min<_Tp, __digits, false> {
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const _Tp value = _Tp(0);
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
template <class _Tp>
|
|
|
|
class __libcpp_numeric_limits<_Tp, true> {
|
|
|
|
protected:
|
|
|
|
typedef _Tp type;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_signed = type(-1) < type(0);
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits = static_cast<int>(sizeof(type) * __CHAR_BIT__ - is_signed);
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits10 = digits * 3 / 10;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const type __min = __libcpp_compute_min<type, digits, is_signed>::value;
|
|
|
|
static _LIBCPP_CONSTEXPR const type __max = is_signed ? type(type(~0) ^ __min) : type(~0);
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __min; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __max; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return min(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_integer = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_exact = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const int radix = 2;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return type(0); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return type(0); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
|
2023-09-25 07:27:11 +00:00
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return type(0); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return type(0); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return type(0); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return type(0); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
2014-07-31 01:18:05 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_modulo = !std::is_signed<_Tp>::value;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2016-01-13 16:32:00 +00:00
|
|
|
#if defined(__i386__) || defined(__x86_64__) || defined(__pnacl__) || defined(__wasm__)
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = true;
|
2010-05-11 19:42:16 +00:00
|
|
|
#else
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = false;
|
2010-05-11 19:42:16 +00:00
|
|
|
#endif
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
class __libcpp_numeric_limits<bool, true> {
|
|
|
|
protected:
|
|
|
|
typedef bool type;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_signed = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits = 1;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits10 = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_digits10 = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const type __min = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const type __max = true;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __min; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __max; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return min(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_integer = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_exact = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const int radix = 2;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return type(0); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return type(0); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent10 = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent = 0;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent10 = 0;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool has_infinity = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = false;
|
2023-09-25 07:27:11 +00:00
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_absent;
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return type(0); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return type(0); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return type(0); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return type(0); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_toward_zero;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
class __libcpp_numeric_limits<float, true> {
|
|
|
|
protected:
|
|
|
|
typedef float type;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_signed = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits = __FLT_MANT_DIG__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits10 = __FLT_DIG__;
|
2016-12-08 07:30:01 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int max_digits10 = 2 + (digits * 30103l) / 100000l;
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __FLT_MIN__; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __FLT_MAX__; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return -max(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return __FLT_EPSILON__; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return 0.5F; }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent = __FLT_MIN_EXP__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent10 = __FLT_MIN_10_EXP__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent = __FLT_MAX_EXP__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent10 = __FLT_MAX_10_EXP__;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
|
2023-09-25 07:27:11 +00:00
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return __builtin_huge_valf(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return __builtin_nanf(""); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return __builtin_nansf(""); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return __FLT_DENORM_MIN__; }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = false;
|
2021-12-28 19:44:49 +00:00
|
|
|
#if (defined(__arm__) || defined(__aarch64__))
|
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
|
|
|
|
#else
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
2021-12-28 19:44:49 +00:00
|
|
|
#endif
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
class __libcpp_numeric_limits<double, true> {
|
|
|
|
protected:
|
|
|
|
typedef double type;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_signed = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits = __DBL_MANT_DIG__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits10 = __DBL_DIG__;
|
2016-12-08 07:30:01 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int max_digits10 = 2 + (digits * 30103l) / 100000l;
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __DBL_MIN__; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __DBL_MAX__; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return -max(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return __DBL_EPSILON__; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return 0.5; }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent = __DBL_MIN_EXP__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent10 = __DBL_MIN_10_EXP__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent = __DBL_MAX_EXP__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent10 = __DBL_MAX_10_EXP__;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
|
2023-09-25 07:27:11 +00:00
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return __builtin_huge_val(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return __builtin_nan(""); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return __builtin_nans(""); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return __DBL_DENORM_MIN__; }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = false;
|
2021-12-28 19:44:49 +00:00
|
|
|
#if (defined(__arm__) || defined(__aarch64__))
|
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
|
|
|
|
#else
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
2021-12-28 19:44:49 +00:00
|
|
|
#endif
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
template <>
|
|
|
|
class __libcpp_numeric_limits<long double, true> {
|
|
|
|
protected:
|
|
|
|
typedef long double type;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_specialized = true;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_signed = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits = __LDBL_MANT_DIG__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits10 = __LDBL_DIG__;
|
2016-12-08 07:30:01 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int max_digits10 = 2 + (digits * 30103l) / 100000l;
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __LDBL_MIN__; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __LDBL_MAX__; }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return -max(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_integer = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_exact = false;
|
|
|
|
static _LIBCPP_CONSTEXPR const int radix = __FLT_RADIX__;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return __LDBL_EPSILON__; }
|
2019-07-01 16:13:31 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return 0.5L; }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent = __LDBL_MIN_EXP__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent10 = __LDBL_MIN_10_EXP__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent = __LDBL_MAX_EXP__;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent10 = __LDBL_MAX_10_EXP__;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool has_infinity = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = true;
|
2023-09-25 07:27:11 +00:00
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = denorm_present;
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = false;
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return __builtin_huge_vall(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return __builtin_nanl(""); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return __builtin_nansl(""); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return __LDBL_DENORM_MIN__; }
|
2010-05-11 19:42:16 +00:00
|
|
|
|
2022-11-22 21:33:34 +00:00
|
|
|
#if defined(__powerpc__) && defined(__LONG_DOUBLE_IBM128__)
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = false;
|
2010-05-11 19:42:16 +00:00
|
|
|
#else
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = true;
|
2010-05-11 19:42:16 +00:00
|
|
|
#endif
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_bounded = true;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_modulo = false;
|
2010-05-11 19:42:16 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = false;
|
2021-12-28 19:44:49 +00:00
|
|
|
#if (defined(__arm__) || defined(__aarch64__))
|
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = true;
|
|
|
|
#else
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = false;
|
2021-12-28 19:44:49 +00:00
|
|
|
#endif
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const float_round_style round_style = round_to_nearest;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
|
|
|
template <class _Tp>
|
2022-09-05 22:33:34 +00:00
|
|
|
class _LIBCPP_TEMPLATE_VIS numeric_limits : private __libcpp_numeric_limits<__remove_cv_t<_Tp> > {
|
|
|
|
typedef __libcpp_numeric_limits<__remove_cv_t<_Tp> > __base;
|
2010-05-11 19:42:16 +00:00
|
|
|
typedef typename __base::type type;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2010-05-11 19:42:16 +00:00
|
|
|
public:
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __base::min(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __base::max(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return __base::lowest(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
|
|
|
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return __base::epsilon(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return __base::round_error(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
2023-09-25 07:27:11 +00:00
|
|
|
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
|
|
|
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return __base::infinity(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return __base::quiet_NaN(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return __base::signaling_NaN(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return __base::denorm_min(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
|
|
|
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
2012-12-12 21:14:28 +00:00
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_specialized;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::digits10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_digits10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_signed;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_integer;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_exact;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::radix;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::min_exponent10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<_Tp>::max_exponent10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_infinity;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_quiet_NaN;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_signaling_NaN;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<_Tp>::has_denorm;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::has_denorm_loss;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_iec559;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_bounded;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::is_modulo;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::traps;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<_Tp>::tinyness_before;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<_Tp>::round_style;
|
|
|
|
|
2010-05-11 19:42:16 +00:00
|
|
|
template <class _Tp>
|
2017-01-04 23:56:00 +00:00
|
|
|
class _LIBCPP_TEMPLATE_VIS numeric_limits<const _Tp> : private numeric_limits<_Tp> {
|
2010-05-11 19:42:16 +00:00
|
|
|
typedef numeric_limits<_Tp> __base;
|
|
|
|
typedef _Tp type;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2010-05-11 19:42:16 +00:00
|
|
|
public:
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __base::min(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __base::max(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return __base::lowest(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
|
|
|
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return __base::epsilon(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return __base::round_error(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
2023-09-25 07:27:11 +00:00
|
|
|
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
|
|
|
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return __base::infinity(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return __base::quiet_NaN(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return __base::signaling_NaN(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return __base::denorm_min(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
|
|
|
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
2012-12-12 21:14:28 +00:00
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_specialized;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::digits10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_digits10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_signed;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_integer;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_exact;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::radix;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::min_exponent10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const _Tp>::max_exponent10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_infinity;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_quiet_NaN;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_signaling_NaN;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const _Tp>::has_denorm;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::has_denorm_loss;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_iec559;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_bounded;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::is_modulo;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::traps;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const _Tp>::tinyness_before;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<const _Tp>::round_style;
|
|
|
|
|
2010-05-11 19:42:16 +00:00
|
|
|
template <class _Tp>
|
2017-01-04 23:56:00 +00:00
|
|
|
class _LIBCPP_TEMPLATE_VIS numeric_limits<volatile _Tp> : private numeric_limits<_Tp> {
|
2010-05-11 19:42:16 +00:00
|
|
|
typedef numeric_limits<_Tp> __base;
|
|
|
|
typedef _Tp type;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2010-05-11 19:42:16 +00:00
|
|
|
public:
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __base::min(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __base::max(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return __base::lowest(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
|
|
|
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return __base::epsilon(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return __base::round_error(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
2023-09-25 07:27:11 +00:00
|
|
|
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
|
|
|
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return __base::infinity(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return __base::quiet_NaN(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return __base::signaling_NaN(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return __base::denorm_min(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
|
|
|
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
2012-12-12 21:14:28 +00:00
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_specialized;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::digits10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_digits10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_signed;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_integer;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_exact;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::radix;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::min_exponent10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<volatile _Tp>::max_exponent10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_infinity;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_quiet_NaN;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_signaling_NaN;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<volatile _Tp>::has_denorm;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::has_denorm_loss;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_iec559;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_bounded;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::is_modulo;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::traps;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<volatile _Tp>::tinyness_before;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<volatile _Tp>::round_style;
|
|
|
|
|
2010-05-11 19:42:16 +00:00
|
|
|
template <class _Tp>
|
2017-01-04 23:56:00 +00:00
|
|
|
class _LIBCPP_TEMPLATE_VIS numeric_limits<const volatile _Tp> : private numeric_limits<_Tp> {
|
2010-05-11 19:42:16 +00:00
|
|
|
typedef numeric_limits<_Tp> __base;
|
|
|
|
typedef _Tp type;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2010-05-11 19:42:16 +00:00
|
|
|
public:
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_specialized = __base::is_specialized;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type min() _NOEXCEPT { return __base::min(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type max() _NOEXCEPT { return __base::max(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type lowest() _NOEXCEPT { return __base::lowest(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int digits = __base::digits;
|
|
|
|
static _LIBCPP_CONSTEXPR const int digits10 = __base::digits10;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_digits10 = __base::max_digits10;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_signed = __base::is_signed;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_integer = __base::is_integer;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_exact = __base::is_exact;
|
|
|
|
static _LIBCPP_CONSTEXPR const int radix = __base::radix;
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type epsilon() _NOEXCEPT { return __base::epsilon(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type round_error() _NOEXCEPT { return __base::round_error(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent = __base::min_exponent;
|
|
|
|
static _LIBCPP_CONSTEXPR const int min_exponent10 = __base::min_exponent10;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent = __base::max_exponent;
|
|
|
|
static _LIBCPP_CONSTEXPR const int max_exponent10 = __base::max_exponent10;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool has_infinity = __base::has_infinity;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_quiet_NaN = __base::has_quiet_NaN;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool has_signaling_NaN = __base::has_signaling_NaN;
|
2023-09-25 07:27:11 +00:00
|
|
|
_LIBCPP_SUPPRESS_DEPRECATED_PUSH
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const float_denorm_style has_denorm = __base::has_denorm;
|
|
|
|
static _LIBCPP_DEPRECATED_IN_CXX23 _LIBCPP_CONSTEXPR const bool has_denorm_loss = __base::has_denorm_loss;
|
|
|
|
_LIBCPP_SUPPRESS_DEPRECATED_POP
|
2012-04-02 19:23:15 +00:00
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type infinity() _NOEXCEPT { return __base::infinity(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type quiet_NaN() _NOEXCEPT { return __base::quiet_NaN(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type signaling_NaN() _NOEXCEPT { return __base::signaling_NaN(); }
|
|
|
|
_LIBCPP_HIDE_FROM_ABI static _LIBCPP_CONSTEXPR type denorm_min() _NOEXCEPT { return __base::denorm_min(); }
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool is_iec559 = __base::is_iec559;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_bounded = __base::is_bounded;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool is_modulo = __base::is_modulo;
|
2023-12-18 19:01:33 +00:00
|
|
|
|
2012-04-02 19:23:15 +00:00
|
|
|
static _LIBCPP_CONSTEXPR const bool traps = __base::traps;
|
|
|
|
static _LIBCPP_CONSTEXPR const bool tinyness_before = __base::tinyness_before;
|
|
|
|
static _LIBCPP_CONSTEXPR const float_round_style round_style = __base::round_style;
|
2010-05-11 19:42:16 +00:00
|
|
|
};
|
|
|
|
|
2012-12-12 21:14:28 +00:00
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_specialized;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::digits10;
|
|
|
|
template <class _Tp>
|
2014-05-30 12:09:47 +00:00
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_digits10;
|
2012-12-12 21:14:28 +00:00
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_signed;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_integer;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_exact;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::radix;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::min_exponent10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const int numeric_limits<const volatile _Tp>::max_exponent10;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_infinity;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_quiet_NaN;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_signaling_NaN;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const float_denorm_style numeric_limits<const volatile _Tp>::has_denorm;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::has_denorm_loss;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_iec559;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_bounded;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::is_modulo;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::traps;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const bool numeric_limits<const volatile _Tp>::tinyness_before;
|
|
|
|
template <class _Tp>
|
|
|
|
_LIBCPP_CONSTEXPR const float_round_style numeric_limits<const volatile _Tp>::round_style;
|
|
|
|
|
2010-05-11 19:42:16 +00:00
|
|
|
_LIBCPP_END_NAMESPACE_STD
|
|
|
|
|
2017-05-31 22:07:49 +00:00
|
|
|
_LIBCPP_POP_MACROS
|
|
|
|
|
2023-07-07 21:12:05 +00:00
|
|
|
#if !defined(_LIBCPP_REMOVE_TRANSITIVE_INCLUDES) && _LIBCPP_STD_VER <= 20
|
|
|
|
# include <type_traits>
|
|
|
|
#endif
|
|
|
|
|
2021-04-20 16:03:32 +00:00
|
|
|
#endif // _LIBCPP_LIMITS
|