Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
wide_range.hpp File Reference
#include <algorithm>
#include <cmath>
#include <cstdint>
#include <limits>
#include <optional>
#include <universal/number/takum/takum_traits.hpp>
#include <universal/number/takum/takum_wide_arithmetic.hpp>
#include <universal/number/shared/specific_value_encoding.hpp>

Classes

struct  sw::universal::takum_wide_range::dd

Namespaces

namespace  sw
 required std libraries
namespace  sw::universal
namespace  sw::universal::takum_wide_range

Enumerations

enum class  sw::universal::takum_wide_range::integral_mode { sw::universal::takum_wide_range::trunc , sw::universal::takum_wide_range::round , sw::universal::takum_wide_range::floor , sw::universal::takum_wide_range::ceil }

Functions

dd sw::universal::takum_wide_range::two_sum (double a, double b)
dd sw::universal::takum_wide_range::add (const dd &a, const dd &b)
dd sw::universal::takum_wide_range::mul (const dd &a, const dd &b)
dd sw::universal::takum_wide_range::neg (const dd &a)
template<typename T>
int64_t sw::universal::takum_wide_range::characteristic (const T &x)
template<typename T>
bool sw::universal::takum_wide_range::is_tiny (const T &x)
template<typename T>
bool sw::universal::takum_wide_range::is_huge (const T &x)
template<typename T>
bool sw::universal::takum_wide_range::is_far (const T &x)
template<typename T>
T sw::universal::takum_wide_range::saturated (bool high, bool negative)
template<typename T>
dd sw::universal::takum_wide_range::ln_abs (const T &x)
template<typename T>
T sw::universal::takum_wide_range::assemble (const typename T::Codec::encoded &enc, bool negative)
template<typename T>
T sw::universal::takum_wide_range::from_ln (const dd &L, bool negative)
template<typename T>
T sw::universal::takum_wide_range::from_log2 (const dd &t, bool negative)
template<typename T>
T sw::universal::takum_wide_range::scaled (double r, int64_t k)
template<typename T>
int64_t sw::universal::takum_wide_range::binary_exponent (const T &x)
template<typename T>
double sw::universal::takum_wide_range::scaled_down (const T &x, int64_t k)
template<typename T>
T sw::universal::takum_wide_range::absolute (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::exp (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::exp2 (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::exp10 (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::expm1 (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::sinh (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::cosh (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::asinh (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::acosh (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::identity_if_tiny (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::one_if_tiny (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::reciprocal_if_tiny (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::log (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::log2 (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::log10 (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::log1p (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::pow_core (const T &x, double dy, bool yHuge, bool yTiny, bool yNegative)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::pow (const T &x, const T &y)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::pow (const T &x, double y)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::erf (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::erfc (const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::hypot (const T &x, const T &y)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::atan2 (const T &y, const T &x)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::integral (const T &x, integral_mode mode)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::frac (const T &x)
uint64_t sw::universal::takum_wide_range::mulmod (uint64_t a, uint64_t b, uint64_t m)
uint64_t sw::universal::takum_wide_range::pow2mod (uint64_t e, uint64_t m)
int sw::universal::takum_wide_range::compare_scaled (uint64_t A, int64_t ea, uint64_t B, int64_t eb)
template<typename T>
std::optional< T > sw::universal::takum_wide_range::fmod_exact (const T &x, const T &y, bool ieee_remainder)

Variables

constexpr double sw::universal::takum_wide_range::ln2_hi = 0x1.62e42fefa39efp-1
constexpr double sw::universal::takum_wide_range::ln2_lo = 0x1.abc9e3b39803fp-56
constexpr double sw::universal::takum_wide_range::inv_ln2_hi = 0x1.71547652b82fep+0
constexpr double sw::universal::takum_wide_range::inv_ln2_lo = 0x1.777d0ffda0d24p-56
constexpr double sw::universal::takum_wide_range::log2_10_hi = 0x1.a934f0979a371p+1
constexpr double sw::universal::takum_wide_range::log2_10_lo = 0x1.7f2495fb7fa6dp-53
constexpr double sw::universal::takum_wide_range::inv_ln10_hi = 0x1.bcb7b1526e50ep-2
constexpr double sw::universal::takum_wide_range::inv_ln10_lo = 0x1.95355baaafad3p-57
constexpr double sw::universal::takum_wide_range::half_ln_pi_hi = 0x1.250d048e7a1bdp-1
constexpr double sw::universal::takum_wide_range::half_ln_pi_lo = 0x1.7abf2ad8d5088p-58
constexpr double sw::universal::takum_wide_range::ln_2_over_sqrt_pi_hi = 0x1.eeb95b094c191p-4
constexpr double sw::universal::takum_wide_range::ln_2_over_sqrt_pi_lo = 0x1.346863f58b075p-58