xentara-utils v2.0.4
The Xentara Utility Library
|
Information about an IEEE floating point type. More...
#include <xentara/utils/numeric/IeeeFloatingPointTraits.hpp>
Classes | |
struct | Bits |
A type that can store all the bits of the type. More... | |
Static Public Member Functions | |
static consteval auto | signBitMask () -> Bits |
Gets a bit mask for the sign bit. | |
static consteval auto | exponentBitMask () -> Bits |
Gets a bit mask for all of the used bits. | |
static consteval auto | mantissaBitMask () -> Bits |
Gets a bit mask for the sign bit. | |
static consteval auto | integerBitMask () -> Bits |
Gets a bit mask for the extra integer bit of x86 80-bit extended precision format. | |
static consteval auto | relevantBitMask () -> Bits |
Gets a bit mask for all of the relevant bits. | |
static consteval auto | zeroBits () -> Bits |
Gets the bits for the value 0. | |
static consteval auto | infinityBits () -> Bits |
Gets the bits for infinity. | |
static consteval auto | signalingNanBits () -> Bits |
Gets the bits for a signalling NaN. | |
static consteval auto | quietNanBits () -> Bits |
Gets the bits for a quiet NaN. | |
static constexpr auto | bits (const Type &value) -> Bits |
Gets the bits for a certain value. | |
static constexpr auto | fromBits (const Bits &bits) -> Type |
Gets the value represented by certain bits. | |
Static Public Attributes | |
static constexpr bool | kIsIeeeFloatingPoint |
Indicates that this is a IEEE floating point type. | |
static constexpr int | kSignBits |
The number of sign bits. | |
static constexpr int | kExponentBits |
The number of exponent bits. | |
static constexpr int | kMantissaBits |
The number of mantissa bits. | |
static constexpr int | kRelevantBits |
The total number of relevant bits. | |
static constexpr bool | kHasPadding |
Whether there are padding bits. | |
Information about an IEEE floating point type.
This is a specialization of IeeeFloatingPointTraits for actual IEEE floating point types.
|
staticconstexpr |
Gets the bits for a certain value.
This function is only available for IEEE floating point types
value | The value. |
|
static |
Gets a bit mask for all of the used bits.
This function is only available for IEEE floating point types
|
staticconstexpr |
Gets the value represented by certain bits.
This function is only available for IEEE floating point types
bits | The bits. |
|
static |
Gets the bits for infinity.
This function is only available for IEEE floating point types
|
static |
Gets a bit mask for the extra integer bit of x86 80-bit extended precision format.
Contary to single, double, and quad precision floating points, x86 80-bit floats do not have an implicit leading 1 bit in the mantissa, but store this bit explicitly. This is called the integer bit, because it represents the integer part of the mantissa.
This function is only available for IEEE floating point types
|
static |
Gets a bit mask for the sign bit.
This function is only available for IEEE floating point types
|
static |
Gets the bits for a quiet NaN.
This function is only available for IEEE floating point types
|
static |
Gets a bit mask for all of the relevant bits.
This function is only available for IEEE floating point types
|
static |
Gets the bits for a signalling NaN.
This function is only available for IEEE floating point types
|
static |
Gets a bit mask for the sign bit.
This function is only available for IEEE floating point types
|
static |
Gets the bits for the value 0.
This function is only available for IEEE floating point types
|
staticconstexpr |
The number of exponent bits.
For types that are not IEEE floating point types, this value is 0.
|
staticconstexpr |
Whether there are padding bits.
For types that are not IEEE floating point types, this value is false.
|
staticconstexpr |
Indicates that this is a IEEE floating point type.
|
staticconstexpr |
The number of mantissa bits.
For types that are not IEEE floating point types, this value is 0.
|
staticconstexpr |
The total number of relevant bits.
For types that are not IEEE floating point types, this value is 0.
|
staticconstexpr |
The number of sign bits.
This value is 1 for all IEEE floating point types.
For types that are not IEEE floating point types, this value is 0.