Universal Numbers Library C++ API
sw::universal -- header-only custom arithmetic types (posit, cfloat, lns, fixpnt, dd/qd, and more)
Loading...
Searching...
No Matches
sw::universal::efloat< nlimbs > Class Template Reference

#include <efloat_impl.hpp>

Classes

struct  uninitialized_t
struct  native_limbs
struct  native_rounding

Public Types

using limb_t = limb_kernels::limb_t

Public Member Functions

constexpr efloat () noexcept
constexpr efloat (const efloat &rhs)
constexpr efloat (efloat &&rhs) noexcept
constexpr efloat (uninitialized_t) noexcept
constexpr efloat & operator= (const efloat &rhs)
constexpr efloat & operator= (efloat &&rhs) noexcept
constexpr efloat (bool sign, int64_t exponent, const std::vector< uint32_t > &limbs, bool nan=false, bool inf=false, bool zero=false)
constexpr efloat (signed char iv) noexcept
constexpr efloat (short iv) noexcept
constexpr efloat (int iv) noexcept
constexpr efloat (long iv) noexcept
constexpr efloat (long long iv) noexcept
constexpr efloat (char iv) noexcept
constexpr efloat (unsigned short iv) noexcept
constexpr efloat (unsigned int iv) noexcept
constexpr efloat (unsigned long iv) noexcept
constexpr efloat (unsigned long long iv) noexcept
constexpr efloat (float iv) noexcept
constexpr efloat (double iv) noexcept
constexpr efloat & operator= (signed char rhs) noexcept
constexpr efloat & operator= (short rhs) noexcept
constexpr efloat & operator= (int rhs) noexcept
constexpr efloat & operator= (long rhs) noexcept
constexpr efloat & operator= (long long rhs) noexcept
constexpr efloat & operator= (char rhs) noexcept
constexpr efloat & operator= (unsigned short rhs) noexcept
constexpr efloat & operator= (unsigned int rhs) noexcept
constexpr efloat & operator= (unsigned long rhs) noexcept
constexpr efloat & operator= (unsigned long long rhs) noexcept
constexpr efloat & operator= (float rhs) noexcept
constexpr efloat & operator= (double rhs) noexcept
constexpr operator float () const noexcept
constexpr operator double () const noexcept
constexpr unsigned get_precision () const noexcept
constexpr void set_precision (unsigned bits) noexcept
constexpr bool carries_precision () const noexcept
constexpr void clear_precision () noexcept
constexpr efloat operator- () const noexcept
constexpr efloat & operator+= (const efloat &rhs) noexcept
constexpr efloat & operator+= (double rhs) noexcept
template<typename Integer, typename = std::enable_if_t<std::is_integral_v<Integer>>>
constexpr efloat & operator+= (Integer rhs) noexcept
constexpr efloat & operator-= (const efloat &rhs) noexcept
constexpr efloat & operator-= (double rhs) noexcept
template<typename Integer, typename = std::enable_if_t<std::is_integral_v<Integer>>>
constexpr efloat & operator-= (Integer rhs) noexcept
constexpr efloat & operator*= (const efloat &rhs) noexcept
constexpr efloat & operator*= (double rhs) noexcept
template<typename Integer, typename = std::enable_if_t<std::is_integral_v<Integer>>>
constexpr efloat & operator*= (Integer rhs) noexcept
constexpr efloat & operator/= (const efloat &rhs) noexcept
constexpr efloat & operator/= (double rhs) noexcept
template<typename Integer, typename = std::enable_if_t<std::is_integral_v<Integer>>>
constexpr efloat & operator/= (Integer rhs) noexcept
constexpr void clear () noexcept
constexpr void setzero () noexcept
constexpr void setinf (bool sign=false) noexcept
constexpr void setnan (bool quiet=true) noexcept
constexpr void setsign (bool sign) noexcept
constexpr void setexponent (std::int64_t e) noexcept
constexpr void setlimb (unsigned i, std::uint32_t value)
constexpr void set_significand (const limb_t *w, std::size_t n)
constexpr void assign_rounded_limbs (bool sign, const limb_t *r, std::size_t n, std::int64_t top, bool sticky, unsigned precision_limbs)
template<std::size_t M>
constexpr void assign_rounded_short (bool sign, limb_t *t, limb_t below, bool rest, std::int64_t exponent, unsigned precision_limbs)
constexpr efloat & assign (std::string_view txt)
constexpr bool iszero () const noexcept
constexpr bool isone () const noexcept
constexpr bool isodd () const noexcept
constexpr bool iseven () const noexcept
constexpr bool ispos () const noexcept
constexpr bool isneg () const noexcept
constexpr bool isinf () const noexcept
constexpr bool isnan () const noexcept
constexpr bool isqnan () const noexcept
constexpr bool issnan () const noexcept
constexpr int sign () const noexcept
constexpr int64_t scale () const noexcept
double significant () const noexcept
std::vector< uint32_t > bits () const
std::vector< uint32_t > limb_vector () const
constexpr const limb_t * limb_data () const noexcept
constexpr std::size_t limb_count () const noexcept
constexpr std::size_t limb32_count () const noexcept
constexpr std::uint32_t limb32 (std::size_t i) const noexcept
constexpr void normalize ()
constexpr void normalize_significand ()
constexpr void enforce_range () noexcept
constexpr bool is_power_of_2 () const noexcept
constexpr efloat & assign_product (const efloat &a, const efloat &b)
constexpr efloat & assign_quotient (const efloat &a, const efloat &b)
constexpr efloat & assign_sum (const efloat &a, const efloat &b, bool negate_b)

Static Public Member Functions

static constexpr bool in_range (int64_t e) noexcept
static constexpr int compare_limbs (const efloat &a, const efloat &b) noexcept

Static Public Attributes

static constexpr unsigned maxNrLimbs = nlimbs
static constexpr int64_t max_scale = (int64_t(1) << 62) - 1
static constexpr int64_t min_scale = -max_scale
static constexpr std::size_t inline_limbs = efloat_inline_limbs(nlimbs)

Protected Types

template<size_t N>
using scratch_buffer = efloat_storage::scratch_limbs<N>
using scratch64 = scratch_buffer<768>

Protected Member Functions

constexpr efloat & add (const efloat &rhs, bool negate_rhs) noexcept
constexpr efloat & assign_sum_special (const efloat &a, const efloat &b, bool negate_b)
constexpr void add_magnitude (const limb_t *b, std::size_t nb, int64_t eb, bool b_sign)
constexpr void add_magnitudes (const limb_t *a, std::size_t na, int64_t ea, bool a_sign, const limb_t *b, std::size_t nb, int64_t eb, bool b_sign)
constexpr void add_frame (const limb_t *x, std::size_t nx, const limb_t *y, std::size_t ny, int64_t ex, bool x_sign, uint64_t d, bool same_sign)
constexpr void add_full_length (const limb_t *x, const limb_t *y, std::size_t m, int64_t ex, uint64_t d, bool subtract, bool x_sign)
template<std::size_t M>
constexpr void add_short (const limb_t *x, const limb_t *y, int64_t ex, uint64_t d, bool subtract, bool x_sign)
constexpr void round_cancelled (const limb_t *t, std::size_t m, limb_t o, int64_t ex)
constexpr void multiply_magnitude (const limb_t *b, std::size_t mb, int64_t eb, bool b_sign)
constexpr void multiply_magnitudes (const limb_t *a, std::size_t ma, int64_t ea, bool a_sign, const limb_t *b, std::size_t mb, int64_t eb, bool b_sign)
constexpr void multiply_long (const limb_t *a, std::size_t ma, bool a_sign, const limb_t *b, std::size_t mb, bool b_sign, int64_t top, bool square)
template<std::size_t M>
constexpr void multiply_short (const limb_t *a, const limb_t *b, int64_t top, bool sign)
template<std::size_t M>
constexpr void store_short (limb_t *t, limb_t below, bool rest, int64_t exponent, bool sign)
constexpr void round_into (const limb_t *r, std::size_t n, int64_t top, bool sticky)
constexpr void round_short (const limb_t *r, std::size_t n, int64_t top, bool sticky)
constexpr void round_to_precision ()
constexpr void trim_low_limbs (std::size_t m) noexcept
constexpr void import_limbs32 (const std::uint32_t *v, std::size_t n)
constexpr unsigned precision_limbs () const noexcept
constexpr void normalize_native ()
constexpr void divide_by_limb (uint64_t d, bool negative)
constexpr void divide_limbs_by (const limb_t *a, std::size_t m, int64_t ea, bool a_sign, uint64_t d, bool negative, int64_t shift)
constexpr void divide_magnitude (const limb_t *b, std::size_t dn, int64_t eb, bool b_sign)
constexpr void divide_magnitudes (const limb_t *a, std::size_t na, int64_t ea, bool a_sign, const limb_t *b, std::size_t dn, int64_t eb, bool b_sign)
template<std::size_t M>
constexpr void divide_short (const limb_t *a, std::size_t na, int64_t ea, const limb_t *b, std::size_t dn, int64_t eb, bool sign)
constexpr void divide_long (const limb_t *a, std::size_t na, int64_t ea, bool a_sign, const limb_t *b, std::size_t dn, int64_t eb, bool b_sign)
constexpr void divide_exact_short (const limb_t *a, std::size_t na, int64_t ea, bool a_sign, const limb_t *b, std::size_t dn, int64_t eb, bool b_sign)
template<typename SignedInt, typename = typename std::enable_if< std::is_integral<SignedInt>::value, SignedInt >::type>
constexpr efloat & convert_signed (SignedInt v) noexcept
template<typename UnsignedInt, typename = typename std::enable_if< std::is_integral<UnsignedInt>::value, UnsignedInt >::type>
constexpr efloat & convert_unsigned (UnsignedInt v) noexcept
template<typename Real, typename = typename std::enable_if< std::is_floating_point<Real>::value, Real >::type>
constexpr efloat & convert_ieee754 (Real rhs) noexcept
template<unsigned K, int E_min, int E_max>
constexpr native_rounding round_to_native () const noexcept
template<typename Real, typename = typename std::enable_if< std::is_floating_point<Real>::value, Real >::type>
constexpr Real convert_to_ieee754 () const noexcept

Static Protected Member Functions

static constexpr bool exact_zero_sum_sign (bool a, bool b) noexcept
static constexpr RoundingMode rounding_mode () noexcept
static constexpr void raise_flags (uint32_t flags) noexcept
static constexpr bool rounds_up (RoundingMode mode, bool sign, bool lsb, bool guard, bool sticky) noexcept
template<typename Integer>
static constexpr native_limbs integer_limbs (Integer v) noexcept
static constexpr unsigned default_precision_limbs () noexcept
static constexpr unsigned merged_precision (unsigned a, unsigned b) noexcept

Protected Attributes

FloatingPointState _state
bool _sign
int64_t _exponent
efloat_limbs< inline_limbs > _limb
unsigned _precision_limbs = nlimbs

Static Protected Attributes

static constexpr size_t mulhigh_min_limbs = 16

Friends

template<unsigned nnlimbs>
class efloat_constant
template<unsigned nnlimbs>
constexpr bool operator== (const efloat< nnlimbs > &lhs, const efloat< nnlimbs > &rhs) noexcept
template<unsigned nnlimbs>
constexpr bool operator< (const efloat< nnlimbs > &lhs, const efloat< nnlimbs > &rhs) noexcept
template<unsigned nnlimbs>
signed findMsb (const efloat< nnlimbs > &v)
template<unsigned nnlimbs>
constexpr efloat< nnlimbs > trunc (const efloat< nnlimbs > &x)
template<unsigned nnlimbs>
constexpr efloat< nnlimbs > floor (const efloat< nnlimbs > &x)
template<unsigned nnlimbs>
constexpr efloat< nnlimbs > ceil (const efloat< nnlimbs > &x)
template<unsigned nnlimbs>
constexpr efloat< nnlimbs > round (const efloat< nnlimbs > &x)
template<unsigned nnlimbs>
constexpr efloat< nnlimbs > rint (const efloat< nnlimbs > &x)

Member Typedef Documentation

◆ limb_t

template<unsigned nlimbs = 1024>
using sw::universal::efloat< nlimbs >::limb_t = limb_kernels::limb_t

◆ scratch64

template<unsigned nlimbs = 1024>
using sw::universal::efloat< nlimbs >::scratch64 = scratch_buffer<768>
protected

◆ scratch_buffer

template<unsigned nlimbs = 1024>
template<size_t N>
using sw::universal::efloat< nlimbs >::scratch_buffer = efloat_storage::scratch_limbs<N>
protected

Constructor & Destructor Documentation

◆ efloat() [1/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( )
inlineconstexprnoexcept

◆ efloat() [2/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( const efloat< nlimbs > & rhs)
inlineconstexpr

◆ efloat() [3/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( efloat< nlimbs > && rhs)
inlineconstexprnoexcept

◆ efloat() [4/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( uninitialized_t )
inlineexplicitconstexprnoexcept

◆ efloat() [5/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( bool sign,
int64_t exponent,
const std::vector< uint32_t > & limbs,
bool nan = false,
bool inf = false,
bool zero = false )
inlineconstexpr

◆ efloat() [6/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( signed char iv)
inlineconstexprnoexcept

◆ efloat() [7/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( short iv)
inlineconstexprnoexcept

◆ efloat() [8/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( int iv)
inlineconstexprnoexcept

◆ efloat() [9/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( long iv)
inlineconstexprnoexcept

◆ efloat() [10/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( long long iv)
inlineconstexprnoexcept

◆ efloat() [11/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( char iv)
inlineconstexprnoexcept

◆ efloat() [12/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( unsigned short iv)
inlineconstexprnoexcept

◆ efloat() [13/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( unsigned int iv)
inlineconstexprnoexcept

◆ efloat() [14/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( unsigned long iv)
inlineconstexprnoexcept

◆ efloat() [15/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( unsigned long long iv)
inlineconstexprnoexcept

◆ efloat() [16/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( float iv)
inlineconstexprnoexcept

◆ efloat() [17/17]

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::efloat ( double iv)
inlineconstexprnoexcept

Member Function Documentation

◆ add()

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::add ( const efloat< nlimbs > & rhs,
bool negate_rhs )
inlineconstexprprotectednoexcept

◆ add_frame()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::add_frame ( const limb_t * x,
std::size_t nx,
const limb_t * y,
std::size_t ny,
int64_t ex,
bool x_sign,
uint64_t d,
bool same_sign )
inlineconstexprprotected

◆ add_full_length()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::add_full_length ( const limb_t * x,
const limb_t * y,
std::size_t m,
int64_t ex,
uint64_t d,
bool subtract,
bool x_sign )
inlineconstexprprotected

◆ add_magnitude()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::add_magnitude ( const limb_t * b,
std::size_t nb,
int64_t eb,
bool b_sign )
inlineconstexprprotected

◆ add_magnitudes()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::add_magnitudes ( const limb_t * a,
std::size_t na,
int64_t ea,
bool a_sign,
const limb_t * b,
std::size_t nb,
int64_t eb,
bool b_sign )
inlineconstexprprotected

◆ add_short()

template<unsigned nlimbs = 1024>
template<std::size_t M>
void sw::universal::efloat< nlimbs >::add_short ( const limb_t * x,
const limb_t * y,
int64_t ex,
uint64_t d,
bool subtract,
bool x_sign )
inlineconstexprprotected

◆ assign()

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::assign ( std::string_view txt)
inlineconstexpr

◆ assign_product()

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::assign_product ( const efloat< nlimbs > & a,
const efloat< nlimbs > & b )
inlineconstexpr

◆ assign_quotient()

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::assign_quotient ( const efloat< nlimbs > & a,
const efloat< nlimbs > & b )
inlineconstexpr

◆ assign_rounded_limbs()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::assign_rounded_limbs ( bool sign,
const limb_t * r,
std::size_t n,
std::int64_t top,
bool sticky,
unsigned precision_limbs )
inlineconstexpr

◆ assign_rounded_short()

template<unsigned nlimbs = 1024>
template<std::size_t M>
void sw::universal::efloat< nlimbs >::assign_rounded_short ( bool sign,
limb_t * t,
limb_t below,
bool rest,
std::int64_t exponent,
unsigned precision_limbs )
inlineconstexpr

◆ assign_sum()

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::assign_sum ( const efloat< nlimbs > & a,
const efloat< nlimbs > & b,
bool negate_b )
inlineconstexpr

◆ assign_sum_special()

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::assign_sum_special ( const efloat< nlimbs > & a,
const efloat< nlimbs > & b,
bool negate_b )
inlineconstexprprotected

◆ bits()

template<unsigned nlimbs = 1024>
std::vector< uint32_t > sw::universal::efloat< nlimbs >::bits ( ) const
inline

◆ carries_precision()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::carries_precision ( ) const
inlineconstexprnoexcept

◆ clear()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::clear ( )
inlineconstexprnoexcept

◆ clear_precision()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::clear_precision ( )
inlineconstexprnoexcept

◆ compare_limbs()

template<unsigned nlimbs = 1024>
constexpr int sw::universal::efloat< nlimbs >::compare_limbs ( const efloat< nlimbs > & a,
const efloat< nlimbs > & b )
inlinestaticconstexprnoexcept

◆ convert_ieee754()

template<unsigned nlimbs = 1024>
template<typename Real, typename = typename std::enable_if< std::is_floating_point<Real>::value, Real >::type>
efloat & sw::universal::efloat< nlimbs >::convert_ieee754 ( Real rhs)
inlineconstexprprotectednoexcept

◆ convert_signed()

template<unsigned nlimbs = 1024>
template<typename SignedInt, typename = typename std::enable_if< std::is_integral<SignedInt>::value, SignedInt >::type>
efloat & sw::universal::efloat< nlimbs >::convert_signed ( SignedInt v)
inlineconstexprprotectednoexcept

◆ convert_to_ieee754()

template<unsigned nlimbs = 1024>
template<typename Real, typename = typename std::enable_if< std::is_floating_point<Real>::value, Real >::type>
Real sw::universal::efloat< nlimbs >::convert_to_ieee754 ( ) const
inlineconstexprprotectednoexcept

◆ convert_unsigned()

template<unsigned nlimbs = 1024>
template<typename UnsignedInt, typename = typename std::enable_if< std::is_integral<UnsignedInt>::value, UnsignedInt >::type>
efloat & sw::universal::efloat< nlimbs >::convert_unsigned ( UnsignedInt v)
inlineconstexprprotectednoexcept

◆ default_precision_limbs()

template<unsigned nlimbs = 1024>
constexpr unsigned sw::universal::efloat< nlimbs >::default_precision_limbs ( )
inlinestaticconstexprprotectednoexcept

◆ divide_by_limb()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::divide_by_limb ( uint64_t d,
bool negative )
inlineconstexprprotected

◆ divide_exact_short()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::divide_exact_short ( const limb_t * a,
std::size_t na,
int64_t ea,
bool a_sign,
const limb_t * b,
std::size_t dn,
int64_t eb,
bool b_sign )
inlineconstexprprotected

◆ divide_limbs_by()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::divide_limbs_by ( const limb_t * a,
std::size_t m,
int64_t ea,
bool a_sign,
uint64_t d,
bool negative,
int64_t shift )
inlineconstexprprotected

◆ divide_long()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::divide_long ( const limb_t * a,
std::size_t na,
int64_t ea,
bool a_sign,
const limb_t * b,
std::size_t dn,
int64_t eb,
bool b_sign )
inlineconstexprprotected

◆ divide_magnitude()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::divide_magnitude ( const limb_t * b,
std::size_t dn,
int64_t eb,
bool b_sign )
inlineconstexprprotected

◆ divide_magnitudes()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::divide_magnitudes ( const limb_t * a,
std::size_t na,
int64_t ea,
bool a_sign,
const limb_t * b,
std::size_t dn,
int64_t eb,
bool b_sign )
inlineconstexprprotected

◆ divide_short()

template<unsigned nlimbs = 1024>
template<std::size_t M>
void sw::universal::efloat< nlimbs >::divide_short ( const limb_t * a,
std::size_t na,
int64_t ea,
const limb_t * b,
std::size_t dn,
int64_t eb,
bool sign )
inlineconstexprprotected

◆ enforce_range()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::enforce_range ( )
inlineconstexprnoexcept

◆ exact_zero_sum_sign()

template<unsigned nlimbs = 1024>
constexpr bool sw::universal::efloat< nlimbs >::exact_zero_sum_sign ( bool a,
bool b )
inlinestaticconstexprprotectednoexcept

◆ get_precision()

template<unsigned nlimbs = 1024>
unsigned sw::universal::efloat< nlimbs >::get_precision ( ) const
inlineconstexprnoexcept

◆ import_limbs32()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::import_limbs32 ( const std::uint32_t * v,
std::size_t n )
inlineconstexprprotected

◆ in_range()

template<unsigned nlimbs = 1024>
constexpr bool sw::universal::efloat< nlimbs >::in_range ( int64_t e)
inlinestaticconstexprnoexcept

◆ integer_limbs()

template<unsigned nlimbs = 1024>
template<typename Integer>
constexpr native_limbs sw::universal::efloat< nlimbs >::integer_limbs ( Integer v)
inlinestaticconstexprprotectednoexcept

◆ is_power_of_2()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::is_power_of_2 ( ) const
inlineconstexprnoexcept

◆ iseven()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::iseven ( ) const
inlineconstexprnoexcept

◆ isinf()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::isinf ( ) const
inlineconstexprnoexcept

◆ isnan()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::isnan ( ) const
inlineconstexprnoexcept

◆ isneg()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::isneg ( ) const
inlineconstexprnoexcept

◆ isodd()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::isodd ( ) const
inlineconstexprnoexcept

◆ isone()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::isone ( ) const
inlineconstexprnoexcept

◆ ispos()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::ispos ( ) const
inlineconstexprnoexcept

◆ isqnan()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::isqnan ( ) const
inlineconstexprnoexcept

◆ issnan()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::issnan ( ) const
inlineconstexprnoexcept

◆ iszero()

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::iszero ( ) const
inlineconstexprnoexcept

◆ limb32()

template<unsigned nlimbs = 1024>
std::uint32_t sw::universal::efloat< nlimbs >::limb32 ( std::size_t i) const
inlineconstexprnoexcept

◆ limb32_count()

template<unsigned nlimbs = 1024>
std::size_t sw::universal::efloat< nlimbs >::limb32_count ( ) const
inlineconstexprnoexcept

◆ limb_count()

template<unsigned nlimbs = 1024>
std::size_t sw::universal::efloat< nlimbs >::limb_count ( ) const
inlineconstexprnoexcept

◆ limb_data()

template<unsigned nlimbs = 1024>
const limb_t * sw::universal::efloat< nlimbs >::limb_data ( ) const
inlineconstexprnoexcept

◆ limb_vector()

template<unsigned nlimbs = 1024>
std::vector< uint32_t > sw::universal::efloat< nlimbs >::limb_vector ( ) const
inline

◆ merged_precision()

template<unsigned nlimbs = 1024>
constexpr unsigned sw::universal::efloat< nlimbs >::merged_precision ( unsigned a,
unsigned b )
inlinestaticconstexprprotectednoexcept

◆ multiply_long()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::multiply_long ( const limb_t * a,
std::size_t ma,
bool a_sign,
const limb_t * b,
std::size_t mb,
bool b_sign,
int64_t top,
bool square )
inlineconstexprprotected

◆ multiply_magnitude()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::multiply_magnitude ( const limb_t * b,
std::size_t mb,
int64_t eb,
bool b_sign )
inlineconstexprprotected

◆ multiply_magnitudes()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::multiply_magnitudes ( const limb_t * a,
std::size_t ma,
int64_t ea,
bool a_sign,
const limb_t * b,
std::size_t mb,
int64_t eb,
bool b_sign )
inlineconstexprprotected

◆ multiply_short()

template<unsigned nlimbs = 1024>
template<std::size_t M>
void sw::universal::efloat< nlimbs >::multiply_short ( const limb_t * a,
const limb_t * b,
int64_t top,
bool sign )
inlineconstexprprotected

◆ normalize()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::normalize ( )
inlineconstexpr

◆ normalize_native()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::normalize_native ( )
inlineconstexprprotected

◆ normalize_significand()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::normalize_significand ( )
inlineconstexpr

◆ operator double()

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::operator double ( ) const
inlineexplicitconstexprnoexcept

◆ operator float()

template<unsigned nlimbs = 1024>
sw::universal::efloat< nlimbs >::operator float ( ) const
inlineexplicitconstexprnoexcept

◆ operator*=() [1/3]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator*= ( const efloat< nlimbs > & rhs)
inlineconstexprnoexcept

◆ operator*=() [2/3]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator*= ( double rhs)
inlineconstexprnoexcept

◆ operator*=() [3/3]

template<unsigned nlimbs = 1024>
template<typename Integer, typename = std::enable_if_t<std::is_integral_v<Integer>>>
efloat & sw::universal::efloat< nlimbs >::operator*= ( Integer rhs)
inlineconstexprnoexcept

◆ operator+=() [1/3]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator+= ( const efloat< nlimbs > & rhs)
inlineconstexprnoexcept

◆ operator+=() [2/3]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator+= ( double rhs)
inlineconstexprnoexcept

◆ operator+=() [3/3]

template<unsigned nlimbs = 1024>
template<typename Integer, typename = std::enable_if_t<std::is_integral_v<Integer>>>
efloat & sw::universal::efloat< nlimbs >::operator+= ( Integer rhs)
inlineconstexprnoexcept

◆ operator-()

template<unsigned nlimbs = 1024>
efloat sw::universal::efloat< nlimbs >::operator- ( ) const
inlineconstexprnoexcept

◆ operator-=() [1/3]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator-= ( const efloat< nlimbs > & rhs)
inlineconstexprnoexcept

◆ operator-=() [2/3]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator-= ( double rhs)
inlineconstexprnoexcept

◆ operator-=() [3/3]

template<unsigned nlimbs = 1024>
template<typename Integer, typename = std::enable_if_t<std::is_integral_v<Integer>>>
efloat & sw::universal::efloat< nlimbs >::operator-= ( Integer rhs)
inlineconstexprnoexcept

◆ operator/=() [1/3]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator/= ( const efloat< nlimbs > & rhs)
inlineconstexprnoexcept

◆ operator/=() [2/3]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator/= ( double rhs)
inlineconstexprnoexcept

◆ operator/=() [3/3]

template<unsigned nlimbs = 1024>
template<typename Integer, typename = std::enable_if_t<std::is_integral_v<Integer>>>
efloat & sw::universal::efloat< nlimbs >::operator/= ( Integer rhs)
inlineconstexprnoexcept

◆ operator=() [1/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( char rhs)
inlineconstexprnoexcept

◆ operator=() [2/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( const efloat< nlimbs > & rhs)
inlineconstexpr

◆ operator=() [3/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( double rhs)
inlineconstexprnoexcept

◆ operator=() [4/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( efloat< nlimbs > && rhs)
inlineconstexprnoexcept

◆ operator=() [5/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( float rhs)
inlineconstexprnoexcept

◆ operator=() [6/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( int rhs)
inlineconstexprnoexcept

◆ operator=() [7/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( long long rhs)
inlineconstexprnoexcept

◆ operator=() [8/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( long rhs)
inlineconstexprnoexcept

◆ operator=() [9/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( short rhs)
inlineconstexprnoexcept

◆ operator=() [10/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( signed char rhs)
inlineconstexprnoexcept

◆ operator=() [11/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( unsigned int rhs)
inlineconstexprnoexcept

◆ operator=() [12/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( unsigned long long rhs)
inlineconstexprnoexcept

◆ operator=() [13/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( unsigned long rhs)
inlineconstexprnoexcept

◆ operator=() [14/14]

template<unsigned nlimbs = 1024>
efloat & sw::universal::efloat< nlimbs >::operator= ( unsigned short rhs)
inlineconstexprnoexcept

◆ precision_limbs()

template<unsigned nlimbs = 1024>
unsigned sw::universal::efloat< nlimbs >::precision_limbs ( ) const
inlineconstexprprotectednoexcept

◆ raise_flags()

template<unsigned nlimbs = 1024>
constexpr void sw::universal::efloat< nlimbs >::raise_flags ( uint32_t flags)
inlinestaticconstexprprotectednoexcept

◆ round_cancelled()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::round_cancelled ( const limb_t * t,
std::size_t m,
limb_t o,
int64_t ex )
inlineconstexprprotected

◆ round_into()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::round_into ( const limb_t * r,
std::size_t n,
int64_t top,
bool sticky )
inlineconstexprprotected

◆ round_short()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::round_short ( const limb_t * r,
std::size_t n,
int64_t top,
bool sticky )
inlineconstexprprotected

◆ round_to_native()

template<unsigned nlimbs = 1024>
template<unsigned K, int E_min, int E_max>
native_rounding sw::universal::efloat< nlimbs >::round_to_native ( ) const
inlineconstexprprotectednoexcept

◆ round_to_precision()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::round_to_precision ( )
inlineconstexprprotected

◆ rounding_mode()

template<unsigned nlimbs = 1024>
constexpr RoundingMode sw::universal::efloat< nlimbs >::rounding_mode ( )
inlinestaticconstexprprotectednoexcept

◆ rounds_up()

template<unsigned nlimbs = 1024>
constexpr bool sw::universal::efloat< nlimbs >::rounds_up ( RoundingMode mode,
bool sign,
bool lsb,
bool guard,
bool sticky )
inlinestaticconstexprprotectednoexcept

◆ scale()

template<unsigned nlimbs = 1024>
int64_t sw::universal::efloat< nlimbs >::scale ( ) const
inlineconstexprnoexcept

◆ set_precision()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::set_precision ( unsigned bits)
inlineconstexprnoexcept

◆ set_significand()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::set_significand ( const limb_t * w,
std::size_t n )
inlineconstexpr

◆ setexponent()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::setexponent ( std::int64_t e)
inlineconstexprnoexcept

◆ setinf()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::setinf ( bool sign = false)
inlineconstexprnoexcept

◆ setlimb()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::setlimb ( unsigned i,
std::uint32_t value )
inlineconstexpr

◆ setnan()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::setnan ( bool quiet = true)
inlineconstexprnoexcept

◆ setsign()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::setsign ( bool sign)
inlineconstexprnoexcept

◆ setzero()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::setzero ( )
inlineconstexprnoexcept

◆ sign()

template<unsigned nlimbs = 1024>
int sw::universal::efloat< nlimbs >::sign ( ) const
inlineconstexprnoexcept

◆ significant()

template<unsigned nlimbs = 1024>
double sw::universal::efloat< nlimbs >::significant ( ) const
inlinenoexcept

◆ store_short()

template<unsigned nlimbs = 1024>
template<std::size_t M>
void sw::universal::efloat< nlimbs >::store_short ( limb_t * t,
limb_t below,
bool rest,
int64_t exponent,
bool sign )
inlineconstexprprotected

◆ trim_low_limbs()

template<unsigned nlimbs = 1024>
void sw::universal::efloat< nlimbs >::trim_low_limbs ( std::size_t m)
inlineconstexprprotectednoexcept

◆ ceil

template<unsigned nlimbs = 1024>
template<unsigned nnlimbs>
efloat< nnlimbs > ceil ( const efloat< nnlimbs > & x)
friend

◆ efloat_constant

template<unsigned nlimbs = 1024>
template<unsigned nnlimbs>
friend class efloat_constant
friend

◆ findMsb

template<unsigned nlimbs = 1024>
template<unsigned nnlimbs>
signed findMsb ( const efloat< nnlimbs > & v)
friend

◆ floor

template<unsigned nlimbs = 1024>
template<unsigned nnlimbs>
efloat< nnlimbs > floor ( const efloat< nnlimbs > & x)
friend

◆ operator<

template<unsigned nlimbs = 1024>
template<unsigned nnlimbs>
bool operator< ( const efloat< nnlimbs > & lhs,
const efloat< nnlimbs > & rhs )
friend

◆ operator==

template<unsigned nlimbs = 1024>
template<unsigned nnlimbs>
bool operator== ( const efloat< nnlimbs > & lhs,
const efloat< nnlimbs > & rhs )
friend

◆ rint

template<unsigned nlimbs = 1024>
template<unsigned nnlimbs>
efloat< nnlimbs > rint ( const efloat< nnlimbs > & x)
friend

◆ round

template<unsigned nlimbs = 1024>
template<unsigned nnlimbs>
efloat< nnlimbs > round ( const efloat< nnlimbs > & x)
friend

◆ trunc

template<unsigned nlimbs = 1024>
template<unsigned nnlimbs>
efloat< nnlimbs > trunc ( const efloat< nnlimbs > & x)
friend

Member Data Documentation

◆ _exponent

template<unsigned nlimbs = 1024>
int64_t sw::universal::efloat< nlimbs >::_exponent
protected

◆ _limb

template<unsigned nlimbs = 1024>
efloat_limbs<inline_limbs> sw::universal::efloat< nlimbs >::_limb
protected

◆ _precision_limbs

template<unsigned nlimbs = 1024>
unsigned sw::universal::efloat< nlimbs >::_precision_limbs = nlimbs
protected

◆ _sign

template<unsigned nlimbs = 1024>
bool sw::universal::efloat< nlimbs >::_sign
protected

◆ _state

template<unsigned nlimbs = 1024>
FloatingPointState sw::universal::efloat< nlimbs >::_state
protected

◆ inline_limbs

template<unsigned nlimbs = 1024>
std::size_t sw::universal::efloat< nlimbs >::inline_limbs = efloat_inline_limbs(nlimbs)
staticconstexpr

◆ max_scale

template<unsigned nlimbs = 1024>
int64_t sw::universal::efloat< nlimbs >::max_scale = (int64_t(1) << 62) - 1
staticconstexpr

◆ maxNrLimbs

template<unsigned nlimbs = 1024>
unsigned sw::universal::efloat< nlimbs >::maxNrLimbs = nlimbs
staticconstexpr

◆ min_scale

template<unsigned nlimbs = 1024>
int64_t sw::universal::efloat< nlimbs >::min_scale = -max_scale
staticconstexpr

◆ mulhigh_min_limbs

template<unsigned nlimbs = 1024>
size_t sw::universal::efloat< nlimbs >::mulhigh_min_limbs = 16
staticconstexprprotected

The documentation for this class was generated from the following files:
  • /home/runner/work/universal/universal/include/sw/universal/number/efloat/efloat_fwd.hpp
  • /home/runner/work/universal/universal/include/sw/universal/number/efloat/efloat_impl.hpp