|
Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
|
Classes | |
| struct | dd |
Enumerations | |
| enum class | integral_mode { trunc , round , floor , ceil } |
Functions | |
| dd | two_sum (double a, double b) |
| dd | add (const dd &a, const dd &b) |
| dd | mul (const dd &a, const dd &b) |
| dd | neg (const dd &a) |
| template<typename T> | |
| int64_t | characteristic (const T &x) |
| template<typename T> | |
| bool | is_tiny (const T &x) |
| template<typename T> | |
| bool | is_huge (const T &x) |
| template<typename T> | |
| bool | is_far (const T &x) |
| template<typename T> | |
| T | saturated (bool high, bool negative) |
| template<typename T> | |
| dd | ln_abs (const T &x) |
| template<typename T> | |
| T | assemble (const typename T::Codec::encoded &enc, bool negative) |
| template<typename T> | |
| T | from_ln (const dd &L, bool negative) |
| template<typename T> | |
| T | from_log2 (const dd &t, bool negative) |
| template<typename T> | |
| T | scaled (double r, int64_t k) |
| template<typename T> | |
| int64_t | binary_exponent (const T &x) |
| template<typename T> | |
| double | scaled_down (const T &x, int64_t k) |
| template<typename T> | |
| T | absolute (const T &x) |
| template<typename T> | |
| std::optional< T > | exp (const T &x) |
| template<typename T> | |
| std::optional< T > | exp2 (const T &x) |
| template<typename T> | |
| std::optional< T > | exp10 (const T &x) |
| template<typename T> | |
| std::optional< T > | expm1 (const T &x) |
| template<typename T> | |
| std::optional< T > | sinh (const T &x) |
| template<typename T> | |
| std::optional< T > | cosh (const T &x) |
| template<typename T> | |
| std::optional< T > | asinh (const T &x) |
| template<typename T> | |
| std::optional< T > | acosh (const T &x) |
| template<typename T> | |
| std::optional< T > | identity_if_tiny (const T &x) |
| template<typename T> | |
| std::optional< T > | one_if_tiny (const T &x) |
| template<typename T> | |
| std::optional< T > | reciprocal_if_tiny (const T &x) |
| template<typename T> | |
| std::optional< T > | log (const T &x) |
| template<typename T> | |
| std::optional< T > | log2 (const T &x) |
| template<typename T> | |
| std::optional< T > | log10 (const T &x) |
| template<typename T> | |
| std::optional< T > | log1p (const T &x) |
| template<typename T> | |
| std::optional< T > | pow_core (const T &x, double dy, bool yHuge, bool yTiny, bool yNegative) |
| template<typename T> | |
| std::optional< T > | pow (const T &x, const T &y) |
| template<typename T> | |
| std::optional< T > | pow (const T &x, double y) |
| template<typename T> | |
| std::optional< T > | erf (const T &x) |
| template<typename T> | |
| std::optional< T > | erfc (const T &x) |
| template<typename T> | |
| std::optional< T > | hypot (const T &x, const T &y) |
| template<typename T> | |
| std::optional< T > | atan2 (const T &y, const T &x) |
| template<typename T> | |
| std::optional< T > | integral (const T &x, integral_mode mode) |
| template<typename T> | |
| std::optional< T > | frac (const T &x) |
| uint64_t | mulmod (uint64_t a, uint64_t b, uint64_t m) |
| uint64_t | pow2mod (uint64_t e, uint64_t m) |
| int | compare_scaled (uint64_t A, int64_t ea, uint64_t B, int64_t eb) |
| template<typename T> | |
| std::optional< T > | fmod_exact (const T &x, const T &y, bool ieee_remainder) |
Variables | |
| constexpr double | ln2_hi = 0x1.62e42fefa39efp-1 |
| constexpr double | ln2_lo = 0x1.abc9e3b39803fp-56 |
| constexpr double | inv_ln2_hi = 0x1.71547652b82fep+0 |
| constexpr double | inv_ln2_lo = 0x1.777d0ffda0d24p-56 |
| constexpr double | log2_10_hi = 0x1.a934f0979a371p+1 |
| constexpr double | log2_10_lo = 0x1.7f2495fb7fa6dp-53 |
| constexpr double | inv_ln10_hi = 0x1.bcb7b1526e50ep-2 |
| constexpr double | inv_ln10_lo = 0x1.95355baaafad3p-57 |
| constexpr double | half_ln_pi_hi = 0x1.250d048e7a1bdp-1 |
| constexpr double | half_ln_pi_lo = 0x1.7abf2ad8d5088p-58 |
| constexpr double | ln_2_over_sqrt_pi_hi = 0x1.eeb95b094c191p-4 |
| constexpr double | ln_2_over_sqrt_pi_lo = 0x1.346863f58b075p-58 |
|
strong |
| T sw::universal::takum_wide_range::absolute | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::acosh | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::asinh | ( | const T & | x | ) |
| T sw::universal::takum_wide_range::assemble | ( | const typename T::Codec::encoded & | enc, |
| bool | negative ) |
| std::optional< T > sw::universal::takum_wide_range::atan2 | ( | const T & | y, |
| const T & | x ) |
| int64_t sw::universal::takum_wide_range::binary_exponent | ( | const T & | x | ) |
| int64_t sw::universal::takum_wide_range::characteristic | ( | const T & | x | ) |
|
inline |
| std::optional< T > sw::universal::takum_wide_range::cosh | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::erf | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::erfc | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::exp | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::exp10 | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::exp2 | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::expm1 | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::fmod_exact | ( | const T & | x, |
| const T & | y, | ||
| bool | ieee_remainder ) |
| std::optional< T > sw::universal::takum_wide_range::frac | ( | const T & | x | ) |
| T sw::universal::takum_wide_range::from_ln | ( | const dd & | L, |
| bool | negative ) |
| T sw::universal::takum_wide_range::from_log2 | ( | const dd & | t, |
| bool | negative ) |
| std::optional< T > sw::universal::takum_wide_range::hypot | ( | const T & | x, |
| const T & | y ) |
| std::optional< T > sw::universal::takum_wide_range::identity_if_tiny | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::integral | ( | const T & | x, |
| integral_mode | mode ) |
| bool sw::universal::takum_wide_range::is_far | ( | const T & | x | ) |
| bool sw::universal::takum_wide_range::is_huge | ( | const T & | x | ) |
| bool sw::universal::takum_wide_range::is_tiny | ( | const T & | x | ) |
| dd sw::universal::takum_wide_range::ln_abs | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::log | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::log10 | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::log1p | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::log2 | ( | const T & | x | ) |
|
inline |
| std::optional< T > sw::universal::takum_wide_range::one_if_tiny | ( | const T & | x | ) |
| std::optional< T > sw::universal::takum_wide_range::pow | ( | const T & | x, |
| const T & | y ) |
| std::optional< T > sw::universal::takum_wide_range::pow | ( | const T & | x, |
| double | y ) |
|
inline |
| std::optional< T > sw::universal::takum_wide_range::pow_core | ( | const T & | x, |
| double | dy, | ||
| bool | yHuge, | ||
| bool | yTiny, | ||
| bool | yNegative ) |
| std::optional< T > sw::universal::takum_wide_range::reciprocal_if_tiny | ( | const T & | x | ) |
| T sw::universal::takum_wide_range::saturated | ( | bool | high, |
| bool | negative ) |
| T sw::universal::takum_wide_range::scaled | ( | double | r, |
| int64_t | k ) |
| double sw::universal::takum_wide_range::scaled_down | ( | const T & | x, |
| int64_t | k ) |
| std::optional< T > sw::universal::takum_wide_range::sinh | ( | const T & | x | ) |
|
inline |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |
|
inlineconstexpr |