#include "mathutils.hh"
Public Attributes | ||
char | chars [4] | |
struct { | ||
uint biased_exponent: 8 | ||
uint mantissa: 23 | ||
uint sign: 1 | ||
} | mpn | |
float | v_float | |
Static Public Attributes | |
static constexpr const int | BIAS |
static constexpr const float | EPSILON |
static constexpr const float | FMAX |
static constexpr const float | FMIN |
static constexpr const float | SMAX |
static constexpr const float | SMIN |
Union to compartmentalize an IEEE-754 float. IEEE 754 single precision floating point layout: ``` 31 30 23 22 0 +——–+—————+—————+ | s 1bit | e[30:23] 8bit | f[22:0] 23bit | +——–+—————+—————+ B0——————->B1——->B2–>B3–> ```
float v_float |
uint mantissa |
uint biased_exponent |
uint sign |
struct { ... } mpn |
char chars[4] |
|
staticconstexpr |
2^-24, round-off error at 1.0
|
staticconstexpr |
Exponent bias.
|
staticconstexpr |
0x7f7fffff, 2^128 * (1 - epsilon)
|
staticconstexpr |
0x00800000 Minimum Normal
|
staticconstexpr |
0x007fffff Maximum Subnormal
|
staticconstexpr |
0x00000001 Minimum Subnormal