10 #if !defined(CNL_IMPL_SCALED_INTEGER_NUMERIC_LIMITS_H)
11 #define CNL_IMPL_SCALED_INTEGER_NUMERIC_LIMITS_H
13 #include "definition.h"
26 template<
typename Rep,
int Exponent,
int Radix>
28 : numeric_limits<Rep> {
31 using rep_numeric_limits = numeric_limits<Rep>;
36 [[nodiscard]]
static constexpr
auto min() noexcept
38 return cnl::_impl::from_rep<value_type>(Rep{1});
41 [[nodiscard]]
static constexpr
auto max() noexcept
43 return cnl::_impl::from_rep<value_type>(rep_numeric_limits::max());
46 [[nodiscard]]
static constexpr
auto lowest() noexcept
48 return cnl::_impl::from_rep<value_type>(rep_numeric_limits::lowest());
51 static constexpr
bool is_specialized =
true;
53 static constexpr
bool is_integer =
false;
55 [[nodiscard]]
static constexpr
auto epsilon() noexcept
57 return cnl::_impl::from_rep<value_type>(Rep{1});
60 [[nodiscard]]
static constexpr
auto round_error() noexcept
62 return cnl::_impl::from_rep<value_type>(Rep{0});
65 [[nodiscard]]
static constexpr
auto infinity() noexcept
67 return cnl::_impl::from_rep<value_type>(Rep{0});
70 [[nodiscard]]
static constexpr
auto
73 return cnl::_impl::from_rep<value_type>(Rep{0});
76 [[nodiscard]]
static constexpr
auto
79 return cnl::_impl::from_rep<value_type>(Rep{0});
82 [[nodiscard]]
static constexpr
auto denorm_min() noexcept
84 return cnl::_impl::from_rep<value_type>(Rep{1});
89 #endif // CNL_IMPL_SCALED_INTEGER_NUMERIC_LIMITS_H