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::efloat_constant< nlimbs > Class Template Reference

#include <efloat_constant.hpp>

Public Types

using value_type = efloat<nlimbs>
using limb_t = typename value_type::limb_t

Public Member Functions

constexpr efloat_constant () noexcept
constexpr efloat_constant (const value_type &v) noexcept
constexpr value_type value () const
constexpr operator value_type () const
constexpr operator double () const
constexpr operator float () const
constexpr bool iszero () const noexcept
constexpr bool isinf () const noexcept
constexpr bool isnan () const noexcept
constexpr int sign () const noexcept
constexpr std::int64_t scale () const noexcept
constexpr unsigned get_precision () const noexcept
constexpr std::size_t limb_count () const noexcept
constexpr const limb_t * limb_data () const noexcept
constexpr value_type operator- () const

Static Public Attributes

static constexpr std::size_t capacity = (nlimbs + 1u) / 2u

Member Typedef Documentation

◆ limb_t

template<unsigned nlimbs>
using sw::universal::efloat_constant< nlimbs >::limb_t = typename value_type::limb_t

◆ value_type

template<unsigned nlimbs>
using sw::universal::efloat_constant< nlimbs >::value_type = efloat<nlimbs>

Constructor & Destructor Documentation

◆ efloat_constant() [1/2]

template<unsigned nlimbs>
sw::universal::efloat_constant< nlimbs >::efloat_constant ( )
inlineconstexprnoexcept

◆ efloat_constant() [2/2]

template<unsigned nlimbs>
sw::universal::efloat_constant< nlimbs >::efloat_constant ( const value_type & v)
inlineconstexprnoexcept

Member Function Documentation

◆ get_precision()

template<unsigned nlimbs>
unsigned sw::universal::efloat_constant< nlimbs >::get_precision ( ) const
inlineconstexprnoexcept

◆ isinf()

template<unsigned nlimbs>
bool sw::universal::efloat_constant< nlimbs >::isinf ( ) const
inlineconstexprnoexcept

◆ isnan()

template<unsigned nlimbs>
bool sw::universal::efloat_constant< nlimbs >::isnan ( ) const
inlineconstexprnoexcept

◆ iszero()

template<unsigned nlimbs>
bool sw::universal::efloat_constant< nlimbs >::iszero ( ) const
inlineconstexprnoexcept

◆ limb_count()

template<unsigned nlimbs>
std::size_t sw::universal::efloat_constant< nlimbs >::limb_count ( ) const
inlineconstexprnoexcept

◆ limb_data()

template<unsigned nlimbs>
const limb_t * sw::universal::efloat_constant< nlimbs >::limb_data ( ) const
inlineconstexprnoexcept

◆ operator double()

template<unsigned nlimbs>
sw::universal::efloat_constant< nlimbs >::operator double ( ) const
inlineexplicitconstexpr

◆ operator float()

template<unsigned nlimbs>
sw::universal::efloat_constant< nlimbs >::operator float ( ) const
inlineexplicitconstexpr

◆ operator value_type()

template<unsigned nlimbs>
sw::universal::efloat_constant< nlimbs >::operator value_type ( ) const
inlineconstexpr

◆ operator-()

template<unsigned nlimbs>
value_type sw::universal::efloat_constant< nlimbs >::operator- ( ) const
inlineconstexpr

◆ scale()

template<unsigned nlimbs>
std::int64_t sw::universal::efloat_constant< nlimbs >::scale ( ) const
inlineconstexprnoexcept

◆ sign()

template<unsigned nlimbs>
int sw::universal::efloat_constant< nlimbs >::sign ( ) const
inlineconstexprnoexcept

◆ value()

template<unsigned nlimbs>
value_type sw::universal::efloat_constant< nlimbs >::value ( ) const
inlineconstexpr

Member Data Documentation

◆ capacity

template<unsigned nlimbs>
std::size_t sw::universal::efloat_constant< nlimbs >::capacity = (nlimbs + 1u) / 2u
staticconstexpr

The documentation for this class was generated from the following file: