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::posit< _nbits, _es, bt > Class Template Reference

#include <posit_impl.hpp>

Public Types

typedef bt BlockType

Public Member Functions

 posit ()=default
 trivial constructor
constexpr posit (const posit &)=default
constexpr posit (posit &&)=default
posit & operator= (const posit &)=default
posit & operator= (posit &&)=default
template<unsigned nnbits, unsigned ees, typename bbt>
 posit (const posit< nnbits, ees, bbt > &a) noexcept
 Construct a posit from a posit of another configuration: the source is decoded on its encoding and rounded once into this one (#2070).
constexpr posit (const SpecificValue code) noexcept
constexpr posit (signed char initial_value) noexcept
constexpr posit (short initial_value) noexcept
constexpr posit (int initial_value) noexcept
constexpr posit (long initial_value) noexcept
constexpr posit (long long initial_value) noexcept
constexpr posit (char initial_value) noexcept
constexpr posit (unsigned short initial_value) noexcept
constexpr posit (unsigned int initial_value) noexcept
constexpr posit (unsigned long initial_value) noexcept
constexpr posit (unsigned long long initial_value) noexcept
CONSTEXPRESSION posit (float initial_value) noexcept
CONSTEXPRESSION posit (double initial_value) noexcept
constexpr posit & operator= (signed char rhs) noexcept
constexpr posit & operator= (short rhs) noexcept
constexpr posit & operator= (int rhs) noexcept
constexpr posit & operator= (long rhs) noexcept
constexpr posit & operator= (long long rhs) noexcept
constexpr posit & operator= (char rhs) noexcept
constexpr posit & operator= (unsigned short rhs) noexcept
constexpr posit & operator= (unsigned int rhs) noexcept
constexpr posit & operator= (unsigned long rhs) noexcept
constexpr posit & operator= (unsigned long long rhs) noexcept
CONSTEXPRESSION posit & operator= (float rhs) noexcept
CONSTEXPRESSION posit & operator= (double rhs) noexcept
CONSTEXPRESSION posit (long double initial_value) noexcept
CONSTEXPRESSION posit & operator= (long double rhs) noexcept
template<unsigned vbits>
posit & operator= (const blocksignificand< vbits, bt > &rhs)
constexpr posit operator- () const
constexpr posit & operator++ ()
constexpr posit operator++ (int)
constexpr posit & operator-- ()
constexpr posit operator-- (int)
constexpr posit & operator+= (const posit &rhs)
constexpr posit & operator+= (double rhs)
constexpr posit & operator-= (const posit &rhs)
constexpr posit & operator-= (double rhs)
constexpr posit & operator*= (const posit &rhs)
constexpr posit & operator*= (double rhs)
constexpr posit & operator/= (const posit &rhs)
constexpr posit & operator/= (double rhs)
posit reciprocal () const noexcept
posit abs () const noexcept
 operator int () const noexcept
 operator long () const noexcept
 operator long long () const noexcept
 operator unsigned int () const noexcept
 operator unsigned long () const noexcept
 operator unsigned long long () const noexcept
 operator float () const noexcept
 operator double () const noexcept
 operator long double () const noexcept
template<typename Integer>
Integer to_integer () const noexcept
constexpr bool sign () const noexcept
int scale () const noexcept
constexpr bool isnar () const noexcept
constexpr bool iszero () const noexcept
constexpr bool isone () const noexcept
constexpr bool isminusone () const noexcept
constexpr bool isneg () const noexcept
constexpr bool ispos () const noexcept
constexpr bool ispowerof2 () const noexcept
constexpr bool isinteger () const noexcept
blockbinary< nbits, bt, BinaryNumberType::Signed > bits () const noexcept
unsigned long long encoding () const noexcept
constexpr void clear () noexcept
constexpr void flip () noexcept
constexpr void setzero () noexcept
constexpr void setnar () noexcept
constexpr posit & maxpos () noexcept
constexpr posit & minpos () noexcept
constexpr posit & zero () noexcept
constexpr posit & minneg () noexcept
constexpr posit & maxneg () noexcept
constexpr posit< nbits, es, bt > & setbits (const blockbinary< nbits, bt, BinaryNumberType::Signed > &block)
constexpr posit< nbits, es, bt > & setBitblock (const blockbinary< nbits, bt, BinaryNumberType::Signed > &block)
constexpr posit< nbits, es, bt > & setbits (uint64_t value)
constexpr posit< nbits, es, bt > & setbit (unsigned bitIndex, bool value=true) noexcept
constexpr posit< nbits, es, bt > & setpositive (int scale, uint64_t fraction, unsigned num_fbits) noexcept
template<BlockTripleOperator op = BlockTripleOperator::REP>
blocktriple< fbits, op, bt > to_value () const noexcept
template<typename TargetBlockType = bt>
constexpr void normalize (blocktriple< fbits, BlockTripleOperator::REP, TargetBlockType > &tgt) const noexcept
constexpr void normalizeAddition (blocktriple< fbits, BlockTripleOperator::ADD, bt > &tgt) const
constexpr void normalizeMultiplication (blocktriple< fbits, BlockTripleOperator::MUL, bt > &tgt) const
constexpr void normalizeDivision (blocktriple< fbits, BlockTripleOperator::DIV, bt > &tgt) const
void constexprClassParameters () const noexcept
void showLimbs () const

Static Public Attributes

static constexpr unsigned nbits = _nbits
static constexpr unsigned es = _es
static constexpr unsigned sbits = 1
static constexpr unsigned rbits = nbits - sbits
static constexpr unsigned ebits = es
static constexpr unsigned fbits = (es + 2 >= nbits ? 0 : nbits - 3 - es)
static constexpr unsigned fhbits = fbits + 1
static constexpr unsigned abits = fhbits + 3
static constexpr unsigned mbits = 2 * fhbits
static constexpr unsigned divbits = 3 * fhbits + 4
static constexpr unsigned bitsInByte = 8ull
static constexpr unsigned bitsInBlock = sizeof(bt) * bitsInByte
static constexpr unsigned storageMask = (0xFFFFFFFFFFFFFFFFull >> (64ull - bitsInBlock))
static constexpr bt BLOCK_MASK = bt(~0)
static constexpr bt ALL_ONES = bt(~0)
static constexpr uint32_t ALL_ONES_ES = (0xFFFFul >> (16 - es))
static constexpr unsigned nrBlocks = 1ull + ((nbits - 1ull) / bitsInBlock)
static constexpr unsigned MSU = nrBlocks - 1ull
static constexpr bt MSU_MASK = (ALL_ONES >> (nrBlocks * bitsInBlock - nbits))
static constexpr unsigned bitsInMSU = bitsInBlock - (nrBlocks * bitsInBlock - nbits)
static constexpr bt SIGN_BIT_MASK = bt(bt(1ull) << ((nbits - 1ull) % bitsInBlock))
static constexpr bt LSB_BIT_MASK = bt(1ull)

Friends

template<unsigned nnbits, unsigned ees, typename bbt>
std::ostream & operator<< (std::ostream &ostr, const posit< nnbits, ees, bbt > &p)
template<unsigned nnbits, unsigned ees, typename bbt>
std::istream & operator>> (std::istream &istr, posit< nnbits, ees, bbt > &p)
template<unsigned nnbits, unsigned ees, typename bbt>
constexpr bool operator== (const posit< nnbits, ees, bbt > &lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
constexpr bool operator!= (const posit< nnbits, ees, bbt > &lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
constexpr bool operator< (const posit< nnbits, ees, bbt > &lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
constexpr bool operator> (const posit< nnbits, ees, bbt > &lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
constexpr bool operator<= (const posit< nnbits, ees, bbt > &lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
constexpr bool operator>= (const posit< nnbits, ees, bbt > &lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, signed char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, signed char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, signed char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, signed char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, signed char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, signed char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, char rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, unsigned short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, unsigned short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, unsigned short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, unsigned short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, unsigned short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, unsigned short rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, unsigned int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, unsigned int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, unsigned int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, unsigned int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, unsigned int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, unsigned int rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, unsigned long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, unsigned long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, unsigned long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, unsigned long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, unsigned long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, unsigned long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, unsigned long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, unsigned long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, unsigned long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, unsigned long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, unsigned long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, unsigned long long rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, float rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, float rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, float rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, float rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, float rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, float rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (const posit< nnbits, ees, bbt > &lhs, double rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (const posit< nnbits, ees, bbt > &lhs, double rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (const posit< nnbits, ees, bbt > &lhs, double rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (const posit< nnbits, ees, bbt > &lhs, double rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (const posit< nnbits, ees, bbt > &lhs, double rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (const posit< nnbits, ees, bbt > &lhs, double rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (signed char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (signed char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (signed char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (signed char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (signed char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (signed char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (char lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (unsigned short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (unsigned short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (unsigned short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (unsigned short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (unsigned short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (unsigned short lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (unsigned int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (unsigned int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (unsigned int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (unsigned int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (unsigned int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (unsigned int lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (unsigned long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (unsigned long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (unsigned long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (unsigned long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (unsigned long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (unsigned long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (unsigned long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (unsigned long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (unsigned long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (unsigned long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (unsigned long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (unsigned long long lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (float lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (float lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (float lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (float lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (float lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (float lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== (double lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= (double lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< (double lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> (double lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= (double lhs, const posit< nnbits, ees, bbt > &rhs)
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= (double lhs, const posit< nnbits, ees, bbt > &rhs)

Member Typedef Documentation

◆ BlockType

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
typedef bt sw::universal::posit< _nbits, _es, bt >::BlockType

Constructor & Destructor Documentation

◆ posit() [1/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( )
default

trivial constructor

◆ posit() [2/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( const posit< _nbits, _es, bt > & )
constexprdefault

◆ posit() [3/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( posit< _nbits, _es, bt > && )
constexprdefault

◆ posit() [4/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
sw::universal::posit< _nbits, _es, bt >::posit ( const posit< nnbits, ees, bbt > & a)
inlinenoexcept

Construct a posit from a posit of another configuration: the source is decoded on its encoding and rounded once into this one (#2070).

It went through double, which lost precision past 53 bits, rounded twice, and turned values outside double's range into NaR or 0; a posit saturates to maxpos/minpos instead.

◆ posit() [5/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( const SpecificValue code)
inlineconstexprnoexcept

◆ posit() [6/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( signed char initial_value)
inlineconstexprnoexcept

◆ posit() [7/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( short initial_value)
inlineconstexprnoexcept

◆ posit() [8/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( int initial_value)
inlineconstexprnoexcept

◆ posit() [9/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( long initial_value)
inlineconstexprnoexcept

◆ posit() [10/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( long long initial_value)
inlineconstexprnoexcept

◆ posit() [11/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( char initial_value)
inlineconstexprnoexcept

◆ posit() [12/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( unsigned short initial_value)
inlineconstexprnoexcept

◆ posit() [13/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( unsigned int initial_value)
inlineconstexprnoexcept

◆ posit() [14/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( unsigned long initial_value)
inlineconstexprnoexcept

◆ posit() [15/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::posit ( unsigned long long initial_value)
inlineconstexprnoexcept

◆ posit() [16/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
CONSTEXPRESSION sw::universal::posit< _nbits, _es, bt >::posit ( float initial_value)
inlinenoexcept

◆ posit() [17/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
CONSTEXPRESSION sw::universal::posit< _nbits, _es, bt >::posit ( double initial_value)
inlinenoexcept

◆ posit() [18/18]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
CONSTEXPRESSION sw::universal::posit< _nbits, _es, bt >::posit ( long double initial_value)
inlinenoexcept

Member Function Documentation

◆ abs()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit sw::universal::posit< _nbits, _es, bt >::abs ( ) const
inlinenoexcept

◆ bits()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
blockbinary< nbits, bt, BinaryNumberType::Signed > sw::universal::posit< _nbits, _es, bt >::bits ( ) const
inlinenoexcept

◆ clear()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
void sw::universal::posit< _nbits, _es, bt >::clear ( )
inlineconstexprnoexcept

◆ constexprClassParameters()

template<unsigned nbits, unsigned es, typename bt>
void sw::universal::posit< nbits, es, bt >::constexprClassParameters ( ) const
noexcept

◆ encoding()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned long long sw::universal::posit< _nbits, _es, bt >::encoding ( ) const
inlinenoexcept

◆ flip()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
void sw::universal::posit< _nbits, _es, bt >::flip ( )
inlineconstexprnoexcept

◆ isinteger()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::posit< _nbits, _es, bt >::isinteger ( ) const
inlineconstexprnoexcept

◆ isminusone()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::posit< _nbits, _es, bt >::isminusone ( ) const
inlineconstexprnoexcept

◆ isnar()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::posit< _nbits, _es, bt >::isnar ( ) const
inlineconstexprnoexcept

◆ isneg()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::posit< _nbits, _es, bt >::isneg ( ) const
inlineconstexprnoexcept

◆ isone()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::posit< _nbits, _es, bt >::isone ( ) const
inlineconstexprnoexcept

◆ ispos()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::posit< _nbits, _es, bt >::ispos ( ) const
inlineconstexprnoexcept

◆ ispowerof2()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::posit< _nbits, _es, bt >::ispowerof2 ( ) const
inlineconstexprnoexcept

◆ iszero()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::posit< _nbits, _es, bt >::iszero ( ) const
inlineconstexprnoexcept

◆ maxneg()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::maxneg ( )
inlineconstexprnoexcept

◆ maxpos()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::maxpos ( )
inlineconstexprnoexcept

◆ minneg()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::minneg ( )
inlineconstexprnoexcept

◆ minpos()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::minpos ( )
inlineconstexprnoexcept

◆ normalize()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<typename TargetBlockType = bt>
void sw::universal::posit< _nbits, _es, bt >::normalize ( blocktriple< fbits, BlockTripleOperator::REP, TargetBlockType > & tgt) const
inlineconstexprnoexcept

◆ normalizeAddition()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
void sw::universal::posit< _nbits, _es, bt >::normalizeAddition ( blocktriple< fbits, BlockTripleOperator::ADD, bt > & tgt) const
inlineconstexpr

◆ normalizeDivision()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
void sw::universal::posit< _nbits, _es, bt >::normalizeDivision ( blocktriple< fbits, BlockTripleOperator::DIV, bt > & tgt) const
inlineconstexpr

◆ normalizeMultiplication()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
void sw::universal::posit< _nbits, _es, bt >::normalizeMultiplication ( blocktriple< fbits, BlockTripleOperator::MUL, bt > & tgt) const
inlineconstexpr

◆ operator double()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::operator double ( ) const
inlineexplicitnoexcept

◆ operator float()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::operator float ( ) const
inlineexplicitnoexcept

◆ operator int()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::operator int ( ) const
inlineexplicitnoexcept

◆ operator long()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::operator long ( ) const
inlineexplicitnoexcept

◆ operator long double()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::operator long double ( ) const
inlineexplicitnoexcept

◆ operator long long()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::operator long long ( ) const
inlineexplicitnoexcept

◆ operator unsigned int()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::operator unsigned int ( ) const
inlineexplicitnoexcept

◆ operator unsigned long()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::operator unsigned long ( ) const
inlineexplicitnoexcept

◆ operator unsigned long long()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
sw::universal::posit< _nbits, _es, bt >::operator unsigned long long ( ) const
inlineexplicitnoexcept

◆ operator*=() [1/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator*= ( const posit< _nbits, _es, bt > & rhs)
inlineconstexpr

◆ operator*=() [2/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator*= ( double rhs)
inlineconstexpr

◆ operator++() [1/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator++ ( )
inlineconstexpr

◆ operator++() [2/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit sw::universal::posit< _nbits, _es, bt >::operator++ ( int )
inlineconstexpr

◆ operator+=() [1/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator+= ( const posit< _nbits, _es, bt > & rhs)
inlineconstexpr

◆ operator+=() [2/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator+= ( double rhs)
inlineconstexpr

◆ operator-()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit sw::universal::posit< _nbits, _es, bt >::operator- ( ) const
inlineconstexpr

◆ operator--() [1/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator-- ( )
inlineconstexpr

◆ operator--() [2/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit sw::universal::posit< _nbits, _es, bt >::operator-- ( int )
inlineconstexpr

◆ operator-=() [1/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator-= ( const posit< _nbits, _es, bt > & rhs)
inlineconstexpr

◆ operator-=() [2/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator-= ( double rhs)
inlineconstexpr

◆ operator/=() [1/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator/= ( const posit< _nbits, _es, bt > & rhs)
inlineconstexpr

◆ operator/=() [2/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator/= ( double rhs)
inlineconstexpr

◆ operator=() [1/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( char rhs)
inlineconstexprnoexcept

◆ operator=() [2/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned vbits>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( const blocksignificand< vbits, bt > & rhs)
inline

◆ operator=() [3/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( const posit< _nbits, _es, bt > & )
default

◆ operator=() [4/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
CONSTEXPRESSION posit & sw::universal::posit< _nbits, _es, bt >::operator= ( double rhs)
inlinenoexcept

◆ operator=() [5/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
CONSTEXPRESSION posit & sw::universal::posit< _nbits, _es, bt >::operator= ( float rhs)
inlinenoexcept

◆ operator=() [6/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( int rhs)
inlineconstexprnoexcept

◆ operator=() [7/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
CONSTEXPRESSION posit & sw::universal::posit< _nbits, _es, bt >::operator= ( long double rhs)
inlinenoexcept

◆ operator=() [8/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( long long rhs)
inlineconstexprnoexcept

◆ operator=() [9/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( long rhs)
inlineconstexprnoexcept

◆ operator=() [10/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( posit< _nbits, _es, bt > && )
default

◆ operator=() [11/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( short rhs)
inlineconstexprnoexcept

◆ operator=() [12/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( signed char rhs)
inlineconstexprnoexcept

◆ operator=() [13/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( unsigned int rhs)
inlineconstexprnoexcept

◆ operator=() [14/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( unsigned long long rhs)
inlineconstexprnoexcept

◆ operator=() [15/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( unsigned long rhs)
inlineconstexprnoexcept

◆ operator=() [16/16]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::operator= ( unsigned short rhs)
inlineconstexprnoexcept

◆ reciprocal()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit sw::universal::posit< _nbits, _es, bt >::reciprocal ( ) const
inlinenoexcept

◆ scale()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
int sw::universal::posit< _nbits, _es, bt >::scale ( ) const
inlinenoexcept

◆ setbit()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit< nbits, es, bt > & sw::universal::posit< _nbits, _es, bt >::setbit ( unsigned bitIndex,
bool value = true )
inlineconstexprnoexcept

◆ setBitblock()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit< nbits, es, bt > & sw::universal::posit< _nbits, _es, bt >::setBitblock ( const blockbinary< nbits, bt, BinaryNumberType::Signed > & block)
inlineconstexpr

◆ setbits() [1/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit< nbits, es, bt > & sw::universal::posit< _nbits, _es, bt >::setbits ( const blockbinary< nbits, bt, BinaryNumberType::Signed > & block)
inlineconstexpr

◆ setbits() [2/2]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit< nbits, es, bt > & sw::universal::posit< _nbits, _es, bt >::setbits ( uint64_t value)
inlineconstexpr

◆ setnar()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
void sw::universal::posit< _nbits, _es, bt >::setnar ( )
inlineconstexprnoexcept

◆ setpositive()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit< nbits, es, bt > & sw::universal::posit< _nbits, _es, bt >::setpositive ( int scale,
uint64_t fraction,
unsigned num_fbits )
inlineconstexprnoexcept

◆ setzero()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
void sw::universal::posit< _nbits, _es, bt >::setzero ( )
inlineconstexprnoexcept

◆ showLimbs()

template<unsigned nbits, unsigned es, typename bt>
void sw::universal::posit< nbits, es, bt >::showLimbs ( ) const

◆ sign()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bool sw::universal::posit< _nbits, _es, bt >::sign ( ) const
inlineconstexprnoexcept

◆ to_integer()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<typename Integer>
Integer sw::universal::posit< _nbits, _es, bt >::to_integer ( ) const
inlinenoexcept

◆ to_value()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<BlockTripleOperator op = BlockTripleOperator::REP>
blocktriple< fbits, op, bt > sw::universal::posit< _nbits, _es, bt >::to_value ( ) const
inlinenoexcept

◆ zero()

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
posit & sw::universal::posit< _nbits, _es, bt >::zero ( )
inlineconstexprnoexcept

◆ operator!= [1/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [2/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
char rhs )
friend

◆ operator!= [3/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [4/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
double rhs )
friend

◆ operator!= [5/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
float rhs )
friend

◆ operator!= [6/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
int rhs )
friend

◆ operator!= [7/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
long long rhs )
friend

◆ operator!= [8/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
long rhs )
friend

◆ operator!= [9/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
short rhs )
friend

◆ operator!= [10/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
signed char rhs )
friend

◆ operator!= [11/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
unsigned int rhs )
friend

◆ operator!= [12/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
unsigned long long rhs )
friend

◆ operator!= [13/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
unsigned long rhs )
friend

◆ operator!= [14/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( const posit< nnbits, ees, bbt > & lhs,
unsigned short rhs )
friend

◆ operator!= [15/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( double lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [16/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( float lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [17/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [18/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [19/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [20/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [21/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( signed char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [22/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( unsigned int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [23/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( unsigned long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [24/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( unsigned long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator!= [25/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator!= ( unsigned short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [1/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [2/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
char rhs )
friend

◆ operator< [3/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [4/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
double rhs )
friend

◆ operator< [5/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
float rhs )
friend

◆ operator< [6/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
int rhs )
friend

◆ operator< [7/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
long long rhs )
friend

◆ operator< [8/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
long rhs )
friend

◆ operator< [9/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
short rhs )
friend

◆ operator< [10/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
signed char rhs )
friend

◆ operator< [11/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
unsigned int rhs )
friend

◆ operator< [12/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
unsigned long long rhs )
friend

◆ operator< [13/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
unsigned long rhs )
friend

◆ operator< [14/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( const posit< nnbits, ees, bbt > & lhs,
unsigned short rhs )
friend

◆ operator< [15/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( double lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [16/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( float lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [17/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [18/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [19/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [20/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [21/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( signed char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [22/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( unsigned int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [23/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( unsigned long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [24/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( unsigned long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator< [25/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator< ( unsigned short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<<

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
std::ostream & operator<< ( std::ostream & ostr,
const posit< nnbits, ees, bbt > & p )
friend

◆ operator<= [1/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [2/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
char rhs )
friend

◆ operator<= [3/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [4/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
double rhs )
friend

◆ operator<= [5/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
float rhs )
friend

◆ operator<= [6/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
int rhs )
friend

◆ operator<= [7/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
long long rhs )
friend

◆ operator<= [8/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
long rhs )
friend

◆ operator<= [9/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
short rhs )
friend

◆ operator<= [10/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
signed char rhs )
friend

◆ operator<= [11/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
unsigned int rhs )
friend

◆ operator<= [12/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
unsigned long long rhs )
friend

◆ operator<= [13/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
unsigned long rhs )
friend

◆ operator<= [14/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( const posit< nnbits, ees, bbt > & lhs,
unsigned short rhs )
friend

◆ operator<= [15/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( double lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [16/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( float lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [17/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [18/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [19/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [20/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [21/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( signed char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [22/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( unsigned int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [23/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( unsigned long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [24/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( unsigned long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator<= [25/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator<= ( unsigned short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [1/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [2/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
char rhs )
friend

◆ operator== [3/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [4/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
double rhs )
friend

◆ operator== [5/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
float rhs )
friend

◆ operator== [6/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
int rhs )
friend

◆ operator== [7/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
long long rhs )
friend

◆ operator== [8/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
long rhs )
friend

◆ operator== [9/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
short rhs )
friend

◆ operator== [10/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
signed char rhs )
friend

◆ operator== [11/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
unsigned int rhs )
friend

◆ operator== [12/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
unsigned long long rhs )
friend

◆ operator== [13/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
unsigned long rhs )
friend

◆ operator== [14/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( const posit< nnbits, ees, bbt > & lhs,
unsigned short rhs )
friend

◆ operator== [15/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( double lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [16/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( float lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [17/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [18/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [19/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [20/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [21/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( signed char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [22/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( unsigned int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [23/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( unsigned long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [24/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( unsigned long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator== [25/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator== ( unsigned short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [1/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [2/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
char rhs )
friend

◆ operator> [3/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [4/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
double rhs )
friend

◆ operator> [5/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
float rhs )
friend

◆ operator> [6/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
int rhs )
friend

◆ operator> [7/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
long long rhs )
friend

◆ operator> [8/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
long rhs )
friend

◆ operator> [9/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
short rhs )
friend

◆ operator> [10/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
signed char rhs )
friend

◆ operator> [11/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
unsigned int rhs )
friend

◆ operator> [12/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
unsigned long long rhs )
friend

◆ operator> [13/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
unsigned long rhs )
friend

◆ operator> [14/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( const posit< nnbits, ees, bbt > & lhs,
unsigned short rhs )
friend

◆ operator> [15/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( double lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [16/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( float lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [17/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [18/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [19/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [20/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [21/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( signed char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [22/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( unsigned int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [23/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( unsigned long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [24/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( unsigned long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator> [25/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator> ( unsigned short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [1/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [2/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
char rhs )
friend

◆ operator>= [3/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [4/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
double rhs )
friend

◆ operator>= [5/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
float rhs )
friend

◆ operator>= [6/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
int rhs )
friend

◆ operator>= [7/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
long long rhs )
friend

◆ operator>= [8/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
long rhs )
friend

◆ operator>= [9/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
short rhs )
friend

◆ operator>= [10/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
signed char rhs )
friend

◆ operator>= [11/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
unsigned int rhs )
friend

◆ operator>= [12/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
unsigned long long rhs )
friend

◆ operator>= [13/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
unsigned long rhs )
friend

◆ operator>= [14/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( const posit< nnbits, ees, bbt > & lhs,
unsigned short rhs )
friend

◆ operator>= [15/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( double lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [16/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( float lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [17/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [18/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [19/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [20/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [21/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( signed char lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [22/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( unsigned int lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [23/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( unsigned long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [24/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( unsigned long long lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>= [25/25]

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
bool operator>= ( unsigned short lhs,
const posit< nnbits, ees, bbt > & rhs )
friend

◆ operator>>

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
template<unsigned nnbits, unsigned ees, typename bbt>
std::istream & operator>> ( std::istream & istr,
posit< nnbits, ees, bbt > & p )
friend

Member Data Documentation

◆ abits

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::abits = fhbits + 3
staticconstexpr

◆ ALL_ONES

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bt sw::universal::posit< _nbits, _es, bt >::ALL_ONES = bt(~0)
staticconstexpr

◆ ALL_ONES_ES

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
uint32_t sw::universal::posit< _nbits, _es, bt >::ALL_ONES_ES = (0xFFFFul >> (16 - es))
staticconstexpr

◆ bitsInBlock

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::bitsInBlock = sizeof(bt) * bitsInByte
staticconstexpr

◆ bitsInByte

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::bitsInByte = 8ull
staticconstexpr

◆ bitsInMSU

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::bitsInMSU = bitsInBlock - (nrBlocks * bitsInBlock - nbits)
staticconstexpr

◆ BLOCK_MASK

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bt sw::universal::posit< _nbits, _es, bt >::BLOCK_MASK = bt(~0)
staticconstexpr

◆ divbits

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::divbits = 3 * fhbits + 4
staticconstexpr

◆ ebits

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::ebits = es
staticconstexpr

◆ es

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::es = _es
staticconstexpr

◆ fbits

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::fbits = (es + 2 >= nbits ? 0 : nbits - 3 - es)
staticconstexpr

◆ fhbits

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::fhbits = fbits + 1
staticconstexpr

◆ LSB_BIT_MASK

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bt sw::universal::posit< _nbits, _es, bt >::LSB_BIT_MASK = bt(1ull)
staticconstexpr

◆ mbits

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::mbits = 2 * fhbits
staticconstexpr

◆ MSU

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::MSU = nrBlocks - 1ull
staticconstexpr

◆ MSU_MASK

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bt sw::universal::posit< _nbits, _es, bt >::MSU_MASK = (ALL_ONES >> (nrBlocks * bitsInBlock - nbits))
staticconstexpr

◆ nbits

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::nbits = _nbits
staticconstexpr

◆ nrBlocks

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::nrBlocks = 1ull + ((nbits - 1ull) / bitsInBlock)
staticconstexpr

◆ rbits

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::rbits = nbits - sbits
staticconstexpr

◆ sbits

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::sbits = 1
staticconstexpr

◆ SIGN_BIT_MASK

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
bt sw::universal::posit< _nbits, _es, bt >::SIGN_BIT_MASK = bt(bt(1ull) << ((nbits - 1ull) % bitsInBlock))
staticconstexpr

◆ storageMask

template<unsigned _nbits, unsigned _es, typename bt = std::uint8_t>
unsigned sw::universal::posit< _nbits, _es, bt >::storageMask = (0xFFFFFFFFFFFFFFFFull >> (64ull - bitsInBlock))
staticconstexpr

The documentation for this class was generated from the following files:
  • /home/runner/work/universal/universal/include/sw/universal/number/posit/posit_fwd.hpp
  • /home/runner/work/universal/universal/include/sw/universal/number/posit/posit_impl.hpp
  • /home/runner/work/universal/universal/include/sw/universal/number/posit/debug.hpp