libfxd 0.2.dev
A fixed-point library for C++.
|
Specialization: fxd::fixed is similar to floating-point. More...
#include <limits.hpp>
Public Types | |
using | float_type = fxd::detail::select_float_t< digits > |
Extension: lossless conversion to a floating-point type. | |
Static Public Member Functions | |
static constexpr fxd::fixed< Int, Frac, Raw > | min () noexcept |
Smallest positive value; same semantics as floating-point. | |
static constexpr fxd::fixed< Int, Frac, Raw > | lowest () noexcept |
Closest value to -∞. | |
static constexpr fxd::fixed< Int, Frac, Raw > | max () noexcept |
Maximum value. | |
static constexpr fxd::fixed< Int, Frac, Raw > | epsilon () noexcept |
Smallest increment. | |
static constexpr fxd::fixed< Int, Frac, Raw > | round_error () noexcept |
Maximum possible error. | |
static constexpr fxd::fixed< Int, Frac, Raw > | infinity () noexcept |
Not meaningful, has_infinity is false. | |
static constexpr fxd::fixed< Int, Frac, Raw > | quiet_NaN () noexcept |
Not meaningful, has_quiet_NaN is false. | |
static constexpr fxd::fixed< Int, Frac, Raw > | signaling_NaN () noexcept |
Not meaningful, has_signaling_NaN is false. | |
static constexpr fxd::fixed< Int, Frac, Raw > | denorm_min () noexcept |
Same as min() since there are no denormalized values. | |
static constexpr fxd::fixed< Int, Frac, Raw > | max_pow2 () noexcept |
Extension: maximum power of two. | |
Static Public Attributes | |
static constexpr bool | is_specialized = true |
This is a valid specialization. | |
static constexpr bool | is_signed = numeric_limits<Raw>::is_signed |
Sign depends on the underlying integer type. | |
static constexpr bool | is_integer = Frac <= 0 |
If this represents integers only. | |
static constexpr bool | is_exact = true |
All arithmetic is done with integers, so fxd::fixed is exact. | |
static constexpr bool | has_infinity = false |
No representation for ∞ . | |
static constexpr bool | has_quiet_NaN = false |
No NaN. | |
static constexpr bool | has_signaling_NaN = false |
No NaN. | |
static constexpr float_denorm_style | has_denorm = denorm_absent |
No denormals. | |
static constexpr bool | has_denorm_loss = false |
No denormals. | |
static constexpr float_round_style | round_style = round_toward_zero |
Default rounding is towards zero, just like with integers. | |
static constexpr bool | is_iec559 = false |
Not a standard floating point type. | |
static constexpr bool | is_bounded = numeric_limits<Raw>::is_bounded |
It's bounded by the underlying integer type. | |
static constexpr bool | is_modulo = numeric_limits<Raw>::is_modulo |
It's modulo if the underlying integer is modulo. | |
static constexpr int | radix = numeric_limits<Raw>::radix |
Same radix as the underlying integer. | |
static constexpr int | digits |
fxd::fixed::bits - is_signed . | |
static constexpr int | digits10 |
Same estimation used for floating-point. | |
static constexpr int | max_digits10 |
Same estimation used for floating-point. | |
static constexpr int | min_exponent = 1 - Frac |
Minimum power-of-two that can be stored. | |
static constexpr int | min_exponent10 |
Same estimation used for floating-point. | |
static constexpr int | max_exponent = Int - is_signed |
Maximum power-of-two that can be stored. | |
static constexpr int | max_exponent10 |
Same estimation used for floating-point. | |
static constexpr bool | traps = numeric_limits<Raw>::traps |
Depends on the underlying integer. | |
static constexpr bool | tinyness_before = false |
Not meaningful. | |
static constexpr int | max_bit = Int - is_signed |
Extension: maximum logical bit. | |
static constexpr int | min_bit = - Frac |
Extension: minimum logical bit. | |
Specialization: fxd::fixed is similar to floating-point.
Definition at line 30 of file limits.hpp.
using float_type = fxd::detail::select_float_t<digits> |
Extension: lossless conversion to a floating-point type.
Definition at line 111 of file limits.hpp.
|
inlinestaticconstexprnoexcept |
Same as min()
since there are no denormalized values.
Definition at line 206 of file limits.hpp.
|
inlinestaticconstexprnoexcept |
Smallest increment.
Definition at line 156 of file limits.hpp.
|
inlinestaticconstexprnoexcept |
Not meaningful, has_infinity
is false.
Definition at line 176 of file limits.hpp.
|
inlinestaticconstexprnoexcept |
Closest value to -∞.
Definition at line 127 of file limits.hpp.
|
inlinestaticconstexprnoexcept |
Maximum value.
Definition at line 141 of file limits.hpp.
|
inlinestaticconstexprnoexcept |
Extension: maximum power of two.
Definition at line 216 of file limits.hpp.
|
inlinestaticconstexprnoexcept |
Smallest positive value; same semantics as floating-point.
Definition at line 117 of file limits.hpp.
|
inlinestaticconstexprnoexcept |
Not meaningful, has_quiet_NaN
is false.
Definition at line 186 of file limits.hpp.
|
inlinestaticconstexprnoexcept |
Maximum possible error.
Definition at line 166 of file limits.hpp.
|
inlinestaticconstexprnoexcept |
Not meaningful, has_signaling_NaN
is false.
Definition at line 196 of file limits.hpp.
|
staticconstexpr |
fxd::fixed::bits
- is_signed
.
Definition at line 78 of file limits.hpp.
|
staticconstexpr |
Same estimation used for floating-point.
Definition at line 81 of file limits.hpp.
|
staticconstexpr |
No denormals.
Definition at line 57 of file limits.hpp.
|
staticconstexpr |
No denormals.
Definition at line 60 of file limits.hpp.
|
staticconstexpr |
No representation for ∞ .
Definition at line 48 of file limits.hpp.
|
staticconstexpr |
No NaN.
Definition at line 51 of file limits.hpp.
|
staticconstexpr |
No NaN.
Definition at line 54 of file limits.hpp.
|
staticconstexpr |
It's bounded by the underlying integer type.
Definition at line 69 of file limits.hpp.
|
staticconstexpr |
All arithmetic is done with integers, so fxd::fixed
is exact.
Definition at line 45 of file limits.hpp.
|
staticconstexpr |
Not a standard floating point type.
Definition at line 66 of file limits.hpp.
|
staticconstexpr |
If this represents integers only.
Definition at line 42 of file limits.hpp.
|
staticconstexpr |
It's modulo if the underlying integer is modulo.
Definition at line 72 of file limits.hpp.
|
staticconstexpr |
Sign depends on the underlying integer type.
Definition at line 39 of file limits.hpp.
|
staticconstexpr |
This is a valid specialization.
Definition at line 36 of file limits.hpp.
|
staticconstexpr |
Extension: maximum logical bit.
Definition at line 105 of file limits.hpp.
|
staticconstexpr |
Same estimation used for floating-point.
Definition at line 84 of file limits.hpp.
|
staticconstexpr |
Maximum power-of-two that can be stored.
Definition at line 93 of file limits.hpp.
|
staticconstexpr |
Same estimation used for floating-point.
Definition at line 96 of file limits.hpp.
|
staticconstexpr |
Extension: minimum logical bit.
Definition at line 108 of file limits.hpp.
|
staticconstexpr |
Minimum power-of-two that can be stored.
Definition at line 87 of file limits.hpp.
|
staticconstexpr |
Same estimation used for floating-point.
Definition at line 90 of file limits.hpp.
|
staticconstexpr |
Same radix as the underlying integer.
Definition at line 75 of file limits.hpp.
|
staticconstexpr |
Default rounding is towards zero, just like with integers.
Definition at line 63 of file limits.hpp.
|
staticconstexpr |
Not meaningful.
Definition at line 102 of file limits.hpp.
|
staticconstexpr |
Depends on the underlying integer.
Definition at line 99 of file limits.hpp.