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::faithful< FloatingPointType > Class Template Reference

#include <faithful_impl.hpp>

Public Member Functions

constexpr faithful ()
constexpr faithful (FloatingPointType v, FloatingPointType e)
constexpr faithful (const faithful &)=default
constexpr faithful (faithful &&)=default
constexpr faithful & operator= (const faithful &)=default
constexpr faithful & operator= (faithful &&)=default
 operator FloatingPointType () const
 faithful (long long initial_value)
 faithful (unsigned long long initial_value)
 faithful (FloatingPointType initial_value)
faithful & operator= (long long rhs)
faithful & operator= (unsigned long long rhs)
faithful & operator= (FloatingPointType rhs)
constexpr faithful operator- () const
faithful & operator+= (const faithful &rhs)
faithful & operator+= (double rhs)
faithful & operator-= (const faithful &rhs)
faithful & operator-= (double rhs)
faithful & operator*= (const faithful &rhs)
faithful & operator*= (double rhs)
faithful & operator/= (const faithful &rhs)
faithful & operator/= (double rhs)
faithful & operator++ ()
faithful operator++ (int)
faithful & operator-- ()
faithful operator-- (int)
void reset ()
void setzero ()
void setnan ()
void setinf (bool negative=false)
bool isneg () const
bool iszero () const
bool isinf () const
bool isnan () const
bool sign () const
int scale () const
constexpr FloatingPointType high () const
constexpr FloatingPointType low () const

Friends

template<typename FPType>
std::ostream & operator<< (std::ostream &ostr, const faithful< FPType > &r)
template<typename FPType>
std::istream & operator>> (std::istream &istr, faithful< FPType > &r)
template<typename FPType>
bool operator== (const faithful< FPType > &lhs, const faithful< FPType > &rhs)
template<typename FPType>
bool operator!= (const faithful< FPType > &lhs, const faithful< FPType > &rhs)
template<typename FPType>
bool operator< (const faithful< FPType > &lhs, const faithful< FPType > &rhs)
template<typename FPType>
bool operator> (const faithful< FPType > &lhs, const faithful< FPType > &rhs)
template<typename FPType>
bool operator<= (const faithful< FPType > &lhs, const faithful< FPType > &rhs)
template<typename FPType>
bool operator>= (const faithful< FPType > &lhs, const faithful< FPType > &rhs)

Constructor & Destructor Documentation

◆ faithful() [1/7]

template<typename FloatingPointType = double>
sw::universal::faithful< FloatingPointType >::faithful ( )
inlineconstexpr

◆ faithful() [2/7]

template<typename FloatingPointType = double>
sw::universal::faithful< FloatingPointType >::faithful ( FloatingPointType v,
FloatingPointType e )
inlineconstexpr

◆ faithful() [3/7]

template<typename FloatingPointType = double>
sw::universal::faithful< FloatingPointType >::faithful ( const faithful< FloatingPointType > & )
constexprdefault

◆ faithful() [4/7]

template<typename FloatingPointType = double>
sw::universal::faithful< FloatingPointType >::faithful ( faithful< FloatingPointType > && )
constexprdefault

◆ faithful() [5/7]

template<typename FloatingPointType = double>
sw::universal::faithful< FloatingPointType >::faithful ( long long initial_value)
inline

◆ faithful() [6/7]

template<typename FloatingPointType = double>
sw::universal::faithful< FloatingPointType >::faithful ( unsigned long long initial_value)
inline

◆ faithful() [7/7]

template<typename FloatingPointType = double>
sw::universal::faithful< FloatingPointType >::faithful ( FloatingPointType initial_value)
inline

Member Function Documentation

◆ high()

template<typename FloatingPointType = double>
FloatingPointType sw::universal::faithful< FloatingPointType >::high ( ) const
inlineconstexpr

◆ isinf()

template<typename FloatingPointType = double>
bool sw::universal::faithful< FloatingPointType >::isinf ( ) const
inline

◆ isnan()

template<typename FloatingPointType = double>
bool sw::universal::faithful< FloatingPointType >::isnan ( ) const
inline

◆ isneg()

template<typename FloatingPointType = double>
bool sw::universal::faithful< FloatingPointType >::isneg ( ) const
inline

◆ iszero()

template<typename FloatingPointType = double>
bool sw::universal::faithful< FloatingPointType >::iszero ( ) const
inline

◆ low()

template<typename FloatingPointType = double>
FloatingPointType sw::universal::faithful< FloatingPointType >::low ( ) const
inlineconstexpr

◆ operator FloatingPointType()

template<typename FloatingPointType = double>
sw::universal::faithful< FloatingPointType >::operator FloatingPointType ( ) const
inlineexplicit

◆ operator*=() [1/2]

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

◆ operator*=() [2/2]

template<typename FloatingPointType = double>
faithful & sw::universal::faithful< FloatingPointType >::operator*= ( double rhs)
inline

◆ operator++() [1/2]

template<typename FloatingPointType = double>
faithful & sw::universal::faithful< FloatingPointType >::operator++ ( )
inline

◆ operator++() [2/2]

template<typename FloatingPointType = double>
faithful sw::universal::faithful< FloatingPointType >::operator++ ( int )
inline

◆ operator+=() [1/2]

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

◆ operator+=() [2/2]

template<typename FloatingPointType = double>
faithful & sw::universal::faithful< FloatingPointType >::operator+= ( double rhs)
inline

◆ operator-()

template<typename FloatingPointType = double>
faithful sw::universal::faithful< FloatingPointType >::operator- ( ) const
inlineconstexpr

◆ operator--() [1/2]

template<typename FloatingPointType = double>
faithful & sw::universal::faithful< FloatingPointType >::operator-- ( )
inline

◆ operator--() [2/2]

template<typename FloatingPointType = double>
faithful sw::universal::faithful< FloatingPointType >::operator-- ( int )
inline

◆ operator-=() [1/2]

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

◆ operator-=() [2/2]

template<typename FloatingPointType = double>
faithful & sw::universal::faithful< FloatingPointType >::operator-= ( double rhs)
inline

◆ operator/=() [1/2]

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

◆ operator/=() [2/2]

template<typename FloatingPointType = double>
faithful & sw::universal::faithful< FloatingPointType >::operator/= ( double rhs)
inline

◆ operator=() [1/5]

template<typename FloatingPointType = double>
faithful & sw::universal::faithful< FloatingPointType >::operator= ( const faithful< FloatingPointType > & )
constexprdefault

◆ operator=() [2/5]

template<typename FloatingPointType = double>
faithful & sw::universal::faithful< FloatingPointType >::operator= ( faithful< FloatingPointType > && )
constexprdefault

◆ operator=() [3/5]

template<typename FloatingPointType = double>
faithful & sw::universal::faithful< FloatingPointType >::operator= ( FloatingPointType rhs)
inline

◆ operator=() [4/5]

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

◆ operator=() [5/5]

template<typename FloatingPointType = double>
faithful & sw::universal::faithful< FloatingPointType >::operator= ( unsigned long long rhs)
inline

◆ reset()

template<typename FloatingPointType = double>
void sw::universal::faithful< FloatingPointType >::reset ( )
inline

◆ scale()

template<typename FloatingPointType = double>
int sw::universal::faithful< FloatingPointType >::scale ( ) const
inline

◆ setinf()

template<typename FloatingPointType = double>
void sw::universal::faithful< FloatingPointType >::setinf ( bool negative = false)
inline

◆ setnan()

template<typename FloatingPointType = double>
void sw::universal::faithful< FloatingPointType >::setnan ( )
inline

◆ setzero()

template<typename FloatingPointType = double>
void sw::universal::faithful< FloatingPointType >::setzero ( )
inline

◆ sign()

template<typename FloatingPointType = double>
bool sw::universal::faithful< FloatingPointType >::sign ( ) const
inline

◆ operator!=

template<typename FloatingPointType = double>
template<typename FPType>
bool operator!= ( const faithful< FPType > & lhs,
const faithful< FPType > & rhs )
friend

◆ operator<

template<typename FloatingPointType = double>
template<typename FPType>
bool operator< ( const faithful< FPType > & lhs,
const faithful< FPType > & rhs )
friend

◆ operator<<

template<typename FloatingPointType = double>
template<typename FPType>
std::ostream & operator<< ( std::ostream & ostr,
const faithful< FPType > & r )
friend

◆ operator<=

template<typename FloatingPointType = double>
template<typename FPType>
bool operator<= ( const faithful< FPType > & lhs,
const faithful< FPType > & rhs )
friend

◆ operator==

template<typename FloatingPointType = double>
template<typename FPType>
bool operator== ( const faithful< FPType > & lhs,
const faithful< FPType > & rhs )
friend

◆ operator>

template<typename FloatingPointType = double>
template<typename FPType>
bool operator> ( const faithful< FPType > & lhs,
const faithful< FPType > & rhs )
friend

◆ operator>=

template<typename FloatingPointType = double>
template<typename FPType>
bool operator>= ( const faithful< FPType > & lhs,
const faithful< FPType > & rhs )
friend

◆ operator>>

template<typename FloatingPointType = double>
template<typename FPType>
std::istream & operator>> ( std::istream & istr,
faithful< FPType > & r )
friend

The documentation for this class was generated from the following file:
  • /home/runner/work/universal/universal/include/sw/universal/number/faithful/faithful_impl.hpp