Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
sw::math::constexpr_math::detail Namespace Reference

Functions

constexpr double pow2 (int n)
constexpr float pow2f (int n)
constexpr int floor_to_int (double x)
constexpr int floor_to_int (float x)
constexpr bool is_integer (double y)
constexpr bool is_integer (float y)
constexpr bool is_odd_integer (double y)
constexpr bool is_odd_integer (float y)
template<typename T>
constexpr T pow_by_squaring (T base, unsigned long long exponent)

Variables

constexpr double LOG2E = 1.4426950408889634
constexpr double LN2 = 0.6931471805599453
constexpr double SQRT2 = 1.4142135623730951
constexpr double LL_BOUND_DOUBLE = 9223372036854775808.0
constexpr float LL_BOUND_FLOAT = 0x1p63f

Function Documentation

◆ floor_to_int() [1/2]

int sw::math::constexpr_math::detail::floor_to_int ( double x)
constexpr

◆ floor_to_int() [2/2]

int sw::math::constexpr_math::detail::floor_to_int ( float x)
constexpr

◆ is_integer() [1/2]

bool sw::math::constexpr_math::detail::is_integer ( double y)
constexpr

◆ is_integer() [2/2]

bool sw::math::constexpr_math::detail::is_integer ( float y)
constexpr

◆ is_odd_integer() [1/2]

bool sw::math::constexpr_math::detail::is_odd_integer ( double y)
constexpr

◆ is_odd_integer() [2/2]

bool sw::math::constexpr_math::detail::is_odd_integer ( float y)
constexpr

◆ pow2()

double sw::math::constexpr_math::detail::pow2 ( int n)
constexpr

◆ pow2f()

float sw::math::constexpr_math::detail::pow2f ( int n)
constexpr

◆ pow_by_squaring()

template<typename T>
T sw::math::constexpr_math::detail::pow_by_squaring ( T base,
unsigned long long exponent )
constexpr

Variable Documentation

◆ LL_BOUND_DOUBLE

double sw::math::constexpr_math::detail::LL_BOUND_DOUBLE = 9223372036854775808.0
inlineconstexpr

◆ LL_BOUND_FLOAT

float sw::math::constexpr_math::detail::LL_BOUND_FLOAT = 0x1p63f
inlineconstexpr

◆ LN2

double sw::math::constexpr_math::detail::LN2 = 0.6931471805599453
inlineconstexpr

◆ LOG2E

double sw::math::constexpr_math::detail::LOG2E = 1.4426950408889634
inlineconstexpr

◆ SQRT2

double sw::math::constexpr_math::detail::SQRT2 = 1.4142135623730951
inlineconstexpr