|
HikoGUI
A low latency retained GUI
|
Static Public Attributes | |
| static constexpr int | mantissa_bits = 56 |
| static constexpr int | exponent_bits = 8 |
| static constexpr int | exponent_max = 127 |
| static constexpr int | exponent_min = -128 |
Friends | |
| bool | operator== (decimal lhs, decimal rhs) noexcept |
| auto | operator<=> (decimal lhs, decimal rhs) noexcept |
| constexpr decimal | operator- (decimal rhs) noexcept |
| decimal | operator+ (decimal lhs, decimal rhs) noexcept |
| decimal | operator- (decimal lhs, decimal rhs) noexcept |
| decimal | operator* (decimal lhs, decimal rhs) noexcept |
| decimal | operator/ (decimal lhs, decimal rhs) noexcept |
| decimal | operator% (decimal lhs, decimal rhs) noexcept |
| std::string | to_string (decimal x) noexcept |
| std::ostream & | operator<< (std::ostream &lhs, decimal rhs) |
Extract exponent from value.
The exponent is encoded in the least significant bits so that only a MOVSX instruction is needed.
Extract mantissa from value.
The mantissa is encoded in the most significant bits so that only a single SAR instruction with a small shift value is needed.
Return a normalized decimal.
The returned decimal will not have trailing zeros.