|
fixed_point128 1.0.1.0
128 bit integer, fixed point and floating point arithmetic for C++20
|
Bit level view of an IEEE 754 single-precision value. More...
#include <fp128_shared.h>
Public Member Functions | |
| constexpr | Float (float v=0) noexcept |
| Constructs from a float, or from positive zero when no value is given. | |
| constexpr uint32_t | f () const noexcept |
| Mantissa (fraction) bits. | |
| constexpr uint32_t | e () const noexcept |
| Biased exponent bits. | |
| constexpr uint32_t | s () const noexcept |
| Sign bit (0 = positive, 1 = negative). | |
| constexpr float | val () const noexcept |
| The float these bits encode. | |
| constexpr void | set_f (uint32_t v) noexcept |
| Sets the mantissa. Bits above the field width are dropped, as a bit-field assignment would. | |
| constexpr void | set_e (uint32_t v) noexcept |
| Sets the biased exponent. Bits above the field width are dropped. | |
| constexpr void | set_s (uint32_t v) noexcept |
| Sets the sign bit. | |
Static Public Member Functions | |
| static constexpr float | make (uint32_t s, uint32_t e, uint32_t f) noexcept |
| Assembles a float out of its three fields, see Double::make(). | |
Public Attributes | |
| uint32_t | bits |
| The raw bit pattern of the float. | |
Bit level view of an IEEE 754 single-precision value.
The single precision counterpart of Double, see its documentation.
Definition at line 921 of file fp128_shared.h.
|
inlineconstexprnoexcept |
Constructs from a float, or from positive zero when no value is given.
Definition at line 925 of file fp128_shared.h.
|
inlinenodiscardconstexprnoexcept |
Mantissa (fraction) bits.
Definition at line 928 of file fp128_shared.h.
|
inlinenodiscardconstexprnoexcept |
Biased exponent bits.
Definition at line 930 of file fp128_shared.h.
|
inlinenodiscardconstexprnoexcept |
Sign bit (0 = positive, 1 = negative).
Definition at line 932 of file fp128_shared.h.
|
inlinenodiscardconstexprnoexcept |
The float these bits encode.
Definition at line 934 of file fp128_shared.h.
|
inlineconstexprnoexcept |
Sets the mantissa. Bits above the field width are dropped, as a bit-field assignment would.
Definition at line 937 of file fp128_shared.h.
|
inlineconstexprnoexcept |
Sets the biased exponent. Bits above the field width are dropped.
Definition at line 939 of file fp128_shared.h.
|
inlineconstexprnoexcept |
Sets the sign bit.
Definition at line 941 of file fp128_shared.h.
|
inlinestaticnodiscardconstexprnoexcept |
Assembles a float out of its three fields, see Double::make().
| s | Sign bit. |
| e | Biased exponent. |
| f | Mantissa. |
Definition at line 945 of file fp128_shared.h.
| uint32_t fp128::Float::bits |
The raw bit pattern of the float.
Definition at line 922 of file fp128_shared.h.