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::universal::cfloat_math Namespace Reference

Classes

class  efloat_environment_guard

Typedefs

template<typename Cfloat>
using efloat_for = efloat<static_cast<unsigned>(2u * significand_limbs<Cfloat>() + 2u)>

Functions

template<typename Cfloat>
constexpr bool range_fits_double ()
template<typename Cfloat>
constexpr bool fits_double ()
template<typename Cfloat>
constexpr std::size_t significand_limbs ()
template<unsigned nbits, unsigned es, typename bt, bool sub, bool sup, bool sat>
efloat_for< cfloat< nbits, es, bt, sub, sup, sat > > to_efloat (const cfloat< nbits, es, bt, sub, sup, sat > &x)
template<unsigned nbits, unsigned es, typename bt, bool sub, bool sup, bool sat, unsigned nlimbs>
cfloat< nbits, es, bt, sub, sup, sat > & from_efloat (cfloat< nbits, es, bt, sub, sup, sat > &r, const efloat< nlimbs > &v)
template<typename Cfloat, typename Function>
Cfloat evaluate (Function &&f)
template<unsigned nbits, unsigned es, typename bt, bool sub, bool sup, bool sat>
efloat_for< cfloat< nbits, es, bt, sub, sup, sat > > argument (const cfloat< nbits, es, bt, sub, sup, sat > &x, unsigned W)
template<typename Cfloat, typename Function>
Cfloat unary (const Cfloat &x, Function &&f, bool oddAtZero)
template<typename Cfloat>
efloat_for< Cfloat > argument_from (double v, unsigned W)

Typedef Documentation

◆ efloat_for

template<typename Cfloat>
using sw::universal::cfloat_math::efloat_for = efloat<static_cast<unsigned>(2u * significand_limbs<Cfloat>() + 2u)>

Function Documentation

◆ argument()

template<unsigned nbits, unsigned es, typename bt, bool sub, bool sup, bool sat>
efloat_for< cfloat< nbits, es, bt, sub, sup, sat > > sw::universal::cfloat_math::argument ( const cfloat< nbits, es, bt, sub, sup, sat > & x,
unsigned W )

◆ argument_from()

template<typename Cfloat>
efloat_for< Cfloat > sw::universal::cfloat_math::argument_from ( double v,
unsigned W )

◆ evaluate()

template<typename Cfloat, typename Function>
Cfloat sw::universal::cfloat_math::evaluate ( Function && f)

◆ fits_double()

template<typename Cfloat>
bool sw::universal::cfloat_math::fits_double ( )
constexpr

◆ from_efloat()

template<unsigned nbits, unsigned es, typename bt, bool sub, bool sup, bool sat, unsigned nlimbs>
cfloat< nbits, es, bt, sub, sup, sat > & sw::universal::cfloat_math::from_efloat ( cfloat< nbits, es, bt, sub, sup, sat > & r,
const efloat< nlimbs > & v )

◆ range_fits_double()

template<typename Cfloat>
bool sw::universal::cfloat_math::range_fits_double ( )
constexpr

◆ significand_limbs()

template<typename Cfloat>
std::size_t sw::universal::cfloat_math::significand_limbs ( )
constexpr

◆ to_efloat()

template<unsigned nbits, unsigned es, typename bt, bool sub, bool sup, bool sat>
efloat_for< cfloat< nbits, es, bt, sub, sup, sat > > sw::universal::cfloat_math::to_efloat ( const cfloat< nbits, es, bt, sub, sup, sat > & x)

◆ unary()

template<typename Cfloat, typename Function>
Cfloat sw::universal::cfloat_math::unary ( const Cfloat & x,
Function && f,
bool oddAtZero )