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::elreal< FpType > Class Template Reference

#include <elreal_impl.hpp>

Public Types

using value_type = FpType
using block_type = block<FpType>
using stream_type = ZBCL<FpType>

Public Member Functions

 elreal ()
 elreal (const elreal &)=default
 elreal (elreal &&) noexcept=default
elreal & operator= (const elreal &)=default
elreal & operator= (elreal &&) noexcept=default
 elreal (stream_type v, std::size_t depth=elreal_default_precision())
 elreal (signed char iv)
 elreal (short iv)
 elreal (int iv)
 elreal (long iv)
 elreal (long long iv)
 elreal (unsigned char iv)
 elreal (unsigned short iv)
 elreal (unsigned int iv)
 elreal (unsigned long iv)
 elreal (unsigned long long iv)
 elreal (float iv)
 elreal (double iv)
elreal & operator= (double rhs)
elreal & operator= (float rhs)
elreal & operator= (int rhs)
elreal & operator= (long long rhs)
 elreal (const SpecificValue code)
 operator double () const noexcept
 operator float () const noexcept
 operator long double () const noexcept
elreal operator- () const
elreal & operator+= (const elreal &rhs)
elreal & operator-= (const elreal &rhs)
elreal & operator*= (const elreal &rhs)
elreal & operator/= (const elreal &rhs)
std::size_t precision () const noexcept
elreal & precision (std::size_t d) noexcept
std::vector< block_type > limbs (std::size_t n) const
template<typename T = double>
T approx (std::size_t depth) const
template<typename T = double>
T approx_scaled (std::size_t depth, int64_t down) const
elreal & refine (std::size_t depth) noexcept
const stream_type & stream () const noexcept
bool iszero () const noexcept
bool isnan () const noexcept
bool isinf () const noexcept
bool isfinite () const noexcept
bool isneg () const noexcept
int sign () const noexcept
int64_t scale () const noexcept
stream_type canonical () const

Friends

template<typename>
class elreal

Member Typedef Documentation

◆ block_type

template<typename FpType = double>
using sw::universal::elreal< FpType >::block_type = block<FpType>

◆ stream_type

template<typename FpType = double>
using sw::universal::elreal< FpType >::stream_type = ZBCL<FpType>

◆ value_type

template<typename FpType = double>
using sw::universal::elreal< FpType >::value_type = FpType

Constructor & Destructor Documentation

◆ elreal() [1/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( )
inline

◆ elreal() [2/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( const elreal< FpType > & )
default

◆ elreal() [3/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( elreal< FpType > && )
defaultnoexcept

◆ elreal() [4/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( stream_type v,
std::size_t depth = elreal_default_precision() )
inlineexplicit

◆ elreal() [5/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( signed char iv)
inline

◆ elreal() [6/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( short iv)
inline

◆ elreal() [7/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( int iv)
inline

◆ elreal() [8/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( long iv)
inline

◆ elreal() [9/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( long long iv)
inline

◆ elreal() [10/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( unsigned char iv)
inline

◆ elreal() [11/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( unsigned short iv)
inline

◆ elreal() [12/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( unsigned int iv)
inline

◆ elreal() [13/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( unsigned long iv)
inline

◆ elreal() [14/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( unsigned long long iv)
inline

◆ elreal() [15/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( float iv)
inline

◆ elreal() [16/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( double iv)
inline

◆ elreal() [17/17]

template<typename FpType = double>
sw::universal::elreal< FpType >::elreal ( const SpecificValue code)
inline

Member Function Documentation

◆ approx()

template<typename FpType = double>
template<typename T = double>
T sw::universal::elreal< FpType >::approx ( std::size_t depth) const
inline

◆ approx_scaled()

template<typename FpType = double>
template<typename T = double>
T sw::universal::elreal< FpType >::approx_scaled ( std::size_t depth,
int64_t down ) const
inline

◆ canonical()

template<typename FpType = double>
stream_type sw::universal::elreal< FpType >::canonical ( ) const
inline

◆ isfinite()

template<typename FpType = double>
bool sw::universal::elreal< FpType >::isfinite ( ) const
inlinenoexcept

◆ isinf()

template<typename FpType = double>
bool sw::universal::elreal< FpType >::isinf ( ) const
inlinenoexcept

◆ isnan()

template<typename FpType = double>
bool sw::universal::elreal< FpType >::isnan ( ) const
inlinenoexcept

◆ isneg()

template<typename FpType = double>
bool sw::universal::elreal< FpType >::isneg ( ) const
inlinenoexcept

◆ iszero()

template<typename FpType = double>
bool sw::universal::elreal< FpType >::iszero ( ) const
inlinenoexcept

◆ limbs()

template<typename FpType = double>
std::vector< block_type > sw::universal::elreal< FpType >::limbs ( std::size_t n) const
inline

◆ operator double()

template<typename FpType = double>
sw::universal::elreal< FpType >::operator double ( ) const
inlineexplicitnoexcept

◆ operator float()

template<typename FpType = double>
sw::universal::elreal< FpType >::operator float ( ) const
inlineexplicitnoexcept

◆ operator long double()

template<typename FpType = double>
sw::universal::elreal< FpType >::operator long double ( ) const
inlineexplicitnoexcept

◆ operator*=()

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::operator*= ( const elreal< FpType > & rhs)
inline

◆ operator+=()

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::operator+= ( const elreal< FpType > & rhs)
inline

◆ operator-()

template<typename FpType = double>
elreal sw::universal::elreal< FpType >::operator- ( ) const
inline

◆ operator-=()

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::operator-= ( const elreal< FpType > & rhs)
inline

◆ operator/=()

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::operator/= ( const elreal< FpType > & rhs)
inline

◆ operator=() [1/6]

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::operator= ( const elreal< FpType > & )
default

◆ operator=() [2/6]

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::operator= ( double rhs)
inline

◆ operator=() [3/6]

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::operator= ( elreal< FpType > && )
defaultnoexcept

◆ operator=() [4/6]

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::operator= ( float rhs)
inline

◆ operator=() [5/6]

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::operator= ( int rhs)
inline

◆ operator=() [6/6]

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::operator= ( long long rhs)
inline

◆ precision() [1/2]

template<typename FpType = double>
std::size_t sw::universal::elreal< FpType >::precision ( ) const
inlinenoexcept

◆ precision() [2/2]

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::precision ( std::size_t d)
inlinenoexcept

◆ refine()

template<typename FpType = double>
elreal & sw::universal::elreal< FpType >::refine ( std::size_t depth)
inlinenoexcept

◆ scale()

template<typename FpType = double>
int64_t sw::universal::elreal< FpType >::scale ( ) const
inlinenoexcept

◆ sign()

template<typename FpType = double>
int sw::universal::elreal< FpType >::sign ( ) const
inlinenoexcept

◆ stream()

template<typename FpType = double>
const stream_type & sw::universal::elreal< FpType >::stream ( ) const
inlinenoexcept

◆ elreal

template<typename FpType = double>
template<typename>
friend class elreal
friend

The documentation for this class was generated from the following files:
  • /home/runner/work/universal/universal/include/sw/universal/number/elreal/elreal_fwd.hpp
  • /home/runner/work/universal/universal/include/sw/universal/number/elreal/elreal_impl.hpp