|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
#include <microfloat_impl.hpp>
Classes | |
| struct | float_fields |
Public Member Functions | |
| microfloat ()=default | |
| constexpr | microfloat (const microfloat &)=default |
| constexpr | microfloat (microfloat &&)=default |
| constexpr microfloat & | operator= (const microfloat &)=default |
| constexpr microfloat & | operator= (microfloat &&)=default |
| constexpr | microfloat (const SpecificValue code) noexcept |
| constexpr | microfloat (signed char iv) noexcept |
| constexpr | microfloat (short iv) noexcept |
| constexpr | microfloat (int iv) noexcept |
| constexpr | microfloat (long iv) noexcept |
| constexpr | microfloat (long long iv) noexcept |
| constexpr | microfloat (char iv) noexcept |
| constexpr | microfloat (unsigned short iv) noexcept |
| constexpr | microfloat (unsigned int iv) noexcept |
| constexpr | microfloat (unsigned long iv) noexcept |
| constexpr | microfloat (unsigned long long iv) noexcept |
| constexpr | microfloat (float iv) noexcept |
| constexpr | microfloat (double iv) noexcept |
| constexpr microfloat & | operator= (signed char rhs) noexcept |
| constexpr microfloat & | operator= (short rhs) noexcept |
| constexpr microfloat & | operator= (int rhs) noexcept |
| constexpr microfloat & | operator= (long rhs) noexcept |
| constexpr microfloat & | operator= (long long rhs) noexcept |
| constexpr microfloat & | operator= (char rhs) noexcept |
| constexpr microfloat & | operator= (unsigned short rhs) noexcept |
| constexpr microfloat & | operator= (unsigned int rhs) noexcept |
| constexpr microfloat & | operator= (unsigned long rhs) noexcept |
| constexpr microfloat & | operator= (unsigned long long rhs) noexcept |
| constexpr microfloat & | operator= (float rhs) noexcept |
| constexpr microfloat & | operator= (double rhs) noexcept |
| constexpr | operator float () const noexcept |
| constexpr | operator double () const noexcept |
| constexpr | operator signed char () const noexcept |
| constexpr | operator short () const noexcept |
| constexpr | operator int () const noexcept |
| constexpr | operator long () const noexcept |
| constexpr | operator long long () const noexcept |
| constexpr | operator char () const noexcept |
| constexpr | operator unsigned short () const noexcept |
| constexpr | operator unsigned int () const noexcept |
| constexpr | operator unsigned long () const noexcept |
| constexpr | operator unsigned long long () const noexcept |
| template<typename Integer> | |
| constexpr Integer | to_integer () const noexcept |
| constexpr microfloat | operator- () const noexcept |
| constexpr microfloat & | operator++ () noexcept |
| constexpr microfloat | operator++ (int) noexcept |
| constexpr microfloat & | operator-- () noexcept |
| constexpr microfloat | operator-- (int) noexcept |
| constexpr microfloat & | operator+= (const microfloat &rhs) |
| constexpr microfloat & | operator-= (const microfloat &rhs) |
| constexpr microfloat & | operator*= (const microfloat &rhs) |
| constexpr microfloat & | operator/= (const microfloat &rhs) |
| constexpr void | clear () noexcept |
| constexpr void | setzero () noexcept |
| constexpr void | setnan (int NaNType=NAN_TYPE_SIGNALLING) noexcept |
| constexpr void | setnan (int NaNType, bool sign) noexcept |
| constexpr void | setoverflow (bool sign) noexcept |
| constexpr void | setinf (bool sign=false) noexcept |
| constexpr void | setbit (unsigned i, bool v=true) noexcept |
| constexpr void | setbits (unsigned value) noexcept |
| constexpr microfloat & | minpos () noexcept |
| constexpr microfloat & | maxpos () noexcept |
| constexpr microfloat & | zero () noexcept |
| constexpr microfloat & | minneg () noexcept |
| constexpr microfloat & | maxneg () noexcept |
| constexpr bool | iszero () const noexcept |
| constexpr bool | isone () const noexcept |
| constexpr bool | isodd () const noexcept |
| constexpr bool | iseven () const noexcept |
| constexpr bool | ispos () const noexcept |
| constexpr bool | isneg () const noexcept |
| constexpr bool | isnan (int NaNType=NAN_TYPE_EITHER) const noexcept |
| constexpr bool | isinf (int InfType=INF_TYPE_EITHER) const noexcept |
| constexpr bool | sign () const noexcept |
| constexpr int | scale () const noexcept |
| constexpr uint8_t | bits () const noexcept |
| constexpr bool | test (unsigned bitIndex) const noexcept |
| constexpr bool | at (unsigned bitIndex) const noexcept |
| constexpr uint8_t | nibble (unsigned n) const noexcept |
| constexpr uint8_t | exponent () const noexcept |
| constexpr uint8_t | fraction () const noexcept |
| constexpr float | to_float () const noexcept |
| constexpr void | from_float (float v) noexcept |
Static Public Member Functions | |
| static constexpr float | cx_ldexp (float x, int exp) noexcept |
| static constexpr float_fields | extract_float_fields (float v) noexcept |
Static Public Attributes | |
| static constexpr unsigned | nbits = _nbits |
| static constexpr unsigned | es = _es |
| static constexpr unsigned | fbits = nbits - 1u - es |
| static constexpr int | bias = (1 << (es - 1)) - 1 |
| static constexpr bool | hasInf = _hasInf |
| static constexpr bool | hasNaN = _hasNaN |
| static constexpr bool | isSaturating = _isSaturating |
| static constexpr uint8_t | bitmask = static_cast<uint8_t>((1u << nbits) - 1u) |
| static constexpr uint8_t | sign_mask = static_cast<uint8_t>(1u << (nbits - 1u)) |
| static constexpr uint8_t | exponent_mask = static_cast<uint8_t>(((1u << es) - 1u) << fbits) |
| static constexpr uint8_t | fraction_mask = static_cast<uint8_t>((1u << fbits) - 1u) |
| static constexpr unsigned | max_exp_code = (1u << es) - 1u |
Protected Attributes | |
| uint8_t | _bits |
Friends | |
| template<unsigned n, unsigned e, bool i, bool na, bool s> | |
| constexpr bool | operator== (microfloat< n, e, i, na, s > lhs, microfloat< n, e, i, na, s > rhs) |
| template<unsigned n, unsigned e, bool i, bool na, bool s> | |
| constexpr bool | operator== (microfloat< n, e, i, na, s > lhs, float rhs) |
| template<unsigned n, unsigned e, bool i, bool na, bool s> | |
| constexpr bool | operator== (float lhs, microfloat< n, e, i, na, s > rhs) |
|
default |
|
constexprdefault |
|
constexprdefault |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlinestaticconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineexplicitconstexprnoexcept |
|
inlineconstexpr |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexprnoexcept |
|
constexprdefault |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
constexprdefault |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
inlineconstexprnoexcept |
|
friend |
|
friend |
|
friend |
|
protected |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |
|
staticconstexpr |