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::positExponent< nbits, es, bt > Class Template Reference

#include <posit_exponent.hpp>

Public Member Functions

constexpr positExponent ()
constexpr positExponent (const positExponent &r)=default
constexpr positExponent (positExponent &&r)=default
constexpr positExponent & operator= (const positExponent &r)=default
constexpr positExponent & operator= (positExponent &&r)=default
constexpr void reset ()
constexpr void setzero ()
constexpr unsigned nrBits () const noexcept
constexpr int scale () const noexcept
constexpr long double value () const noexcept
constexpr std::uint32_t bits () const noexcept
constexpr void set (const std::uint32_t &raw, unsigned nrExponentBits)
constexpr void setNrBits (unsigned nrExpBits) noexcept
constexpr void setbit (unsigned i, bool v=true) noexcept
constexpr bool test (unsigned i) const noexcept
constexpr void extract_exponent_bits (const blockbinary< nbits, bt, BinaryNumberType::Signed > &rawPositBits, unsigned nrRegimeBits)
bool increment () noexcept

Friends

template<unsigned nnbits, unsigned ees, typename bbt>
std::ostream & operator<< (std::ostream &ostr, const positExponent< nnbits, ees, bbt > &e)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const positExponent< nnbits, ees, bbt > &lhs, const positExponent< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const positExponent< nnbits, ees, bbt > &lhs, const positExponent< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const positExponent< nnbits, ees, bbt > &lhs, const positExponent< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const positExponent< nnbits, ees, bbt > &lhs, const positExponent< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const positExponent< nnbits, ees, bbt > &lhs, const positExponent< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const positExponent< nnbits, ees, bbt > &lhs, const positExponent< nnbits, ees, bbt > &rhs)

Constructor & Destructor Documentation

◆ positExponent() [1/3]

template<unsigned nbits, unsigned es, typename bt>
sw::universal::positExponent< nbits, es, bt >::positExponent ( )
inlineconstexpr

◆ positExponent() [2/3]

template<unsigned nbits, unsigned es, typename bt>
sw::universal::positExponent< nbits, es, bt >::positExponent ( const positExponent< nbits, es, bt > & r)
constexprdefault

◆ positExponent() [3/3]

template<unsigned nbits, unsigned es, typename bt>
sw::universal::positExponent< nbits, es, bt >::positExponent ( positExponent< nbits, es, bt > && r)
constexprdefault

Member Function Documentation

◆ bits()

template<unsigned nbits, unsigned es, typename bt>
std::uint32_t sw::universal::positExponent< nbits, es, bt >::bits ( ) const
inlineconstexprnoexcept

◆ extract_exponent_bits()

template<unsigned nbits, unsigned es, typename bt>
void sw::universal::positExponent< nbits, es, bt >::extract_exponent_bits ( const blockbinary< nbits, bt, BinaryNumberType::Signed > & rawPositBits,
unsigned nrRegimeBits )
inlineconstexpr

◆ increment()

template<unsigned nbits, unsigned es, typename bt>
bool sw::universal::positExponent< nbits, es, bt >::increment ( )
inlinenoexcept

◆ nrBits()

template<unsigned nbits, unsigned es, typename bt>
unsigned sw::universal::positExponent< nbits, es, bt >::nrBits ( ) const
inlineconstexprnoexcept

◆ operator=() [1/2]

template<unsigned nbits, unsigned es, typename bt>
positExponent & sw::universal::positExponent< nbits, es, bt >::operator= ( const positExponent< nbits, es, bt > & r)
constexprdefault

◆ operator=() [2/2]

template<unsigned nbits, unsigned es, typename bt>
positExponent & sw::universal::positExponent< nbits, es, bt >::operator= ( positExponent< nbits, es, bt > && r)
constexprdefault

◆ reset()

template<unsigned nbits, unsigned es, typename bt>
void sw::universal::positExponent< nbits, es, bt >::reset ( )
inlineconstexpr

◆ scale()

template<unsigned nbits, unsigned es, typename bt>
int sw::universal::positExponent< nbits, es, bt >::scale ( ) const
inlineconstexprnoexcept

◆ set()

template<unsigned nbits, unsigned es, typename bt>
void sw::universal::positExponent< nbits, es, bt >::set ( const std::uint32_t & raw,
unsigned nrExponentBits )
inlineconstexpr

◆ setbit()

template<unsigned nbits, unsigned es, typename bt>
void sw::universal::positExponent< nbits, es, bt >::setbit ( unsigned i,
bool v = true )
inlineconstexprnoexcept

◆ setNrBits()

template<unsigned nbits, unsigned es, typename bt>
void sw::universal::positExponent< nbits, es, bt >::setNrBits ( unsigned nrExpBits)
inlineconstexprnoexcept

◆ setzero()

template<unsigned nbits, unsigned es, typename bt>
void sw::universal::positExponent< nbits, es, bt >::setzero ( )
inlineconstexpr

◆ test()

template<unsigned nbits, unsigned es, typename bt>
bool sw::universal::positExponent< nbits, es, bt >::test ( unsigned i) const
inlineconstexprnoexcept

◆ value()

template<unsigned nbits, unsigned es, typename bt>
long double sw::universal::positExponent< nbits, es, bt >::value ( ) const
inlineconstexprnoexcept

◆ operator!=

template<unsigned nbits, unsigned es, typename bt>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const positExponent< nnbits, ees, bbt > & lhs,
const positExponent< nnbits, ees, bbt > & rhs )
friend

◆ operator<

template<unsigned nbits, unsigned es, typename bt>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const positExponent< nnbits, ees, bbt > & lhs,
const positExponent< nnbits, ees, bbt > & rhs )
friend

◆ operator<<

template<unsigned nbits, unsigned es, typename bt>
template<unsigned nnbits, unsigned ees, typename bbt>
std::ostream & operator<< ( std::ostream & ostr,
const positExponent< nnbits, ees, bbt > & e )
friend

◆ operator<=

template<unsigned nbits, unsigned es, typename bt>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const positExponent< nnbits, ees, bbt > & lhs,
const positExponent< nnbits, ees, bbt > & rhs )
friend

◆ operator==

template<unsigned nbits, unsigned es, typename bt>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const positExponent< nnbits, ees, bbt > & lhs,
const positExponent< nnbits, ees, bbt > & rhs )
friend

◆ operator>

template<unsigned nbits, unsigned es, typename bt>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const positExponent< nnbits, ees, bbt > & lhs,
const positExponent< nnbits, ees, bbt > & rhs )
friend

◆ operator>=

template<unsigned nbits, unsigned es, typename bt>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const positExponent< nnbits, ees, bbt > & lhs,
const positExponent< nnbits, ees, bbt > & rhs )
friend

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