TLFloat 1.15.0
tlfloat::BigInt< N > Class Template Reference

#include <tlfloat/bigint.hpp>

Public Member Functions

constexpr TLFLOAT_INLINE BigInt ()=default
template<typename T, std::enable_if_t<(std::is_integral_v< T > &&!std::is_unsigned_v< T > &&sizeof(T)<=8), int > = 0>
constexpr TLFLOAT_INLINE BigInt (T i)
template<typename T, std::enable_if_t<(std::is_integral_v< T > &&std::is_unsigned_v< T > &&sizeof(T)<=8), int > = 0>
constexpr TLFLOAT_INLINE BigInt (T u)
template<typename T, std::enable_if_t<(std::is_integral_v< T > &&!std::is_unsigned_v< T > &&sizeof(T)<=8 &&!std::is_same_v< T, bool >), int > = 0>
constexpr TLFLOAT_INLINE operator T () const
template<typename T, std::enable_if_t<(std::is_integral_v< T > &&std::is_unsigned_v< T > &&sizeof(T)<=8 &&!std::is_same_v< T, bool >), int > = 0>
constexpr TLFLOAT_INLINE operator T () const
constexpr TLFLOAT_INLINE operator bool () const
constexpr TLFLOAT_INLINE BigInt (const BigUInt< N > &up)
template<int K, std::enable_if_t<(K<(N-1))> * = nullptr>
constexpr TLFLOAT_INLINE BigInt (const BigInt< K > &l)
template<int K, std::enable_if_t<(K==(N-1))> * = nullptr>
constexpr TLFLOAT_INLINE BigInt (const BigInt< K > &l)
constexpr TLFLOAT_INLINE BigInt (const BigInt &m)=default
template<int K, std::enable_if_t<(K==(N+1))> * = nullptr>
constexpr TLFLOAT_INLINE BigInt (const BigInt< K > &h)
template<int K, std::enable_if_t<(K >(N+1))> * = nullptr>
constexpr TLFLOAT_INLINE BigInt (const BigInt< K > &h)
constexpr TLFLOAT_INLINE BigInt (const uint64_t *p)
constexpr TLFLOAT_INLINE BigInt (double d)
constexpr TLFLOAT_INLINE operator double () const
constexpr TLFLOAT_INLINE operator BigUInt< N > () const
constexpr TLFLOAT_INLINE BigInt abs () const
constexpr TLFLOAT_INLINE BigIntoperator= (const BigInt &ip)=default
constexpr TLFLOAT_INLINE BigIntoperator++ ()
constexpr TLFLOAT_INLINE BigInt operator++ (int)
constexpr TLFLOAT_INLINE BigIntoperator-- ()
constexpr TLFLOAT_INLINE BigInt operator-- (int)
constexpr TLFLOAT_INLINE BigInt operator+ (const BigInt &rhs) const
constexpr TLFLOAT_INLINE BigInt operator- (const BigInt &rhs) const
constexpr TLFLOAT_INLINE BigInt operator- () const
constexpr TLFLOAT_INLINE BigInt operator+ () const
constexpr TLFLOAT_INLINE BigInt operator* (const BigInt &rhs) const
constexpr TLFLOAT_INLINE BigInt operator/ (const BigInt &rhs) const
constexpr TLFLOAT_INLINE BigInt operator% (const BigInt &rhs) const
constexpr TLFLOAT_INLINE bool isNegative () const
constexpr TLFLOAT_INLINE bool isZero () const
constexpr TLFLOAT_INLINE BigInt divmod (const BigInt &rhs, const BigUInt< N > &recip, BigInt *mod) const
constexpr TLFLOAT_INLINE BigInt pow (BigUInt< N > e, const BigUInt< N > &m=0, BigUInt< N > recm=0) const
constexpr TLFLOAT_INLINE BigUInt< N > reciprocal () const
constexpr TLFLOAT_INLINE int64_t getWord (unsigned idx) const
constexpr TLFLOAT_INLINE bool operator== (BigInt const &rhs) const
constexpr TLFLOAT_INLINE bool operator!= (BigInt const &rhs) const
constexpr TLFLOAT_INLINE int compare (BigInt const &rhs) const
constexpr TLFLOAT_INLINE bool operator> (BigInt const &rhs) const
constexpr TLFLOAT_INLINE bool operator< (BigInt const &rhs) const
constexpr TLFLOAT_INLINE bool operator<= (BigInt const &rhs) const
constexpr TLFLOAT_INLINE bool operator>= (BigInt const &rhs) const
constexpr TLFLOAT_INLINE BigInt operator& (const BigInt &rhs) const
constexpr TLFLOAT_INLINE BigInt operator| (const BigInt &rhs) const
constexpr TLFLOAT_INLINE BigInt operator^ (const BigInt &rhs) const
constexpr TLFLOAT_INLINE BigInt operator~ () const
constexpr TLFLOAT_INLINE BigInt operator>> (int n) const
constexpr TLFLOAT_INLINE BigInt operator<< (int n) const
constexpr TLFLOAT_INLINE BigIntoperator>>= (int n)
constexpr TLFLOAT_INLINE BigIntoperator<<= (int n)
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE BigInt operator+ (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE BigInt operator- (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE BigInt operator* (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE BigInt operator/ (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE BigInt operator% (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE BigInt operator& (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE BigInt operator| (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE BigInt operator^ (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE bool operator== (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE bool operator!= (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE bool operator> (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE bool operator< (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE bool operator>= (const rhstype &rhs) const
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
constexpr TLFLOAT_INLINE bool operator<= (const rhstype &rhs) const
template<typename srctype>
constexpr TLFLOAT_INLINE BigIntoperator= (const srctype &s)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigIntoperator+= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigIntoperator-= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigIntoperator*= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigIntoperator/= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigIntoperator%= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigIntoperator&= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigIntoperator|= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigIntoperator^= (const rhstype &rhs)
constexpr TLFLOAT_INLINE BigInt (const char *p, const char **endptr=nullptr, const int base=10)

Static Public Member Functions

static TLFLOAT_NOINLINE int snprint (char *cbuf, size_t bufsize, BigInt< N > value, char typespec='d', int width=0, int precision=-1, int base=10, int nbits=1<< N, bool flag_sign=false, bool flag_blank=false, bool flag_alt=false, bool flag_left=false, bool flag_zero=false, bool flag_upper=false, bool flag_unsigned=false, bool flag_ptr=false, const char *prefix="")

Friends

template<int>
class BigUInt
template<int>
class BigInt
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend BigInt operator+ (const lhstype c, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend BigInt operator- (const lhstype c, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend BigInt operator* (const lhstype c, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend BigInt operator/ (const lhstype c, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend BigInt operator% (const lhstype c, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend BigInt operator& (const lhstype c, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend BigInt operator| (const lhstype c, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend BigInt operator^ (const lhstype c, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend bool operator== (const lhstype &lhs, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend bool operator!= (const lhstype &lhs, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend bool operator> (const lhstype &lhs, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend bool operator< (const lhstype &lhs, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend bool operator>= (const lhstype &lhs, const BigInt &rhs)
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
constexpr TLFLOAT_INLINE friend bool operator<= (const lhstype &lhs, const BigInt &rhs)

Detailed Description

template<int N>
class tlfloat::BigInt< N >

This is a trivially copyable template class that represents an arbitrary precision signed integer. It can represent an integer between -(2^(N-1)) and 2^(N-1)-1. The data size of an object is N bits, where N must be 7 or greater.

Constructor & Destructor Documentation

◆ BigInt() [1/12]

template<int N>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( )
constexprdefault

◆ BigInt() [2/12]

template<int N>
template<typename T, std::enable_if_t<(std::is_integral_v< T > &&!std::is_unsigned_v< T > &&sizeof(T)<=8), int > = 0>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( T i)
inlineconstexpr

Cast from any primitive signed integer

◆ BigInt() [3/12]

template<int N>
template<typename T, std::enable_if_t<(std::is_integral_v< T > &&std::is_unsigned_v< T > &&sizeof(T)<=8), int > = 0>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( T u)
inlineconstexpr

Cast from any primitive unsigned integer

◆ BigInt() [4/12]

template<int N>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( const BigUInt< N > & up)
inlineexplicitconstexpr

◆ BigInt() [5/12]

template<int N>
template<int K, std::enable_if_t<(K<(N-1))> * = nullptr>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( const BigInt< K > & l)
inlineconstexpr

◆ BigInt() [6/12]

template<int N>
template<int K, std::enable_if_t<(K==(N-1))> * = nullptr>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( const BigInt< K > & l)
inlineconstexpr

◆ BigInt() [7/12]

template<int N>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( const BigInt< N > & m)
constexprdefault

◆ BigInt() [8/12]

template<int N>
template<int K, std::enable_if_t<(K==(N+1))> * = nullptr>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( const BigInt< K > & h)
inlineconstexpr

◆ BigInt() [9/12]

template<int N>
template<int K, std::enable_if_t<(K >(N+1))> * = nullptr>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( const BigInt< K > & h)
inlineexplicitconstexpr

◆ BigInt() [10/12]

template<int N>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( const uint64_t * p)
inlineconstexpr

◆ BigInt() [11/12]

template<int N>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( double d)
inlineexplicitconstexpr

◆ BigInt() [12/12]

template<int N>
TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt ( const char * p,
const char ** endptr = nullptr,
const int base = 10 )
inlineconstexpr

Member Function Documentation

◆ abs()

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::abs ( ) const
inlineconstexpr

◆ compare()

template<int N>
TLFLOAT_INLINE int tlfloat::BigInt< N >::compare ( BigInt< N > const & rhs) const
inlineconstexpr

◆ divmod()

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::divmod ( const BigInt< N > & rhs,
const BigUInt< N > & recip,
BigInt< N > * mod ) const
inlineconstexpr

◆ getWord()

template<int N>
TLFLOAT_INLINE int64_t tlfloat::BigInt< N >::getWord ( unsigned idx) const
inlineconstexpr

◆ isNegative()

template<int N>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::isNegative ( ) const
inlineconstexpr

◆ isZero()

template<int N>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::isZero ( ) const
inlineconstexpr

◆ operator BigUInt< N >()

template<int N>
TLFLOAT_INLINE tlfloat::BigInt< N >::operator BigUInt< N > ( ) const
inlineconstexpr

◆ operator bool()

template<int N>
TLFLOAT_INLINE tlfloat::BigInt< N >::operator bool ( ) const
inlineexplicitconstexpr

◆ operator double()

template<int N>
TLFLOAT_INLINE tlfloat::BigInt< N >::operator double ( ) const
inlineexplicitconstexpr

◆ operator T() [1/2]

template<int N>
template<typename T, std::enable_if_t<(std::is_integral_v< T > &&std::is_unsigned_v< T > &&sizeof(T)<=8 &&!std::is_same_v< T, bool >), int > = 0>
TLFLOAT_INLINE tlfloat::BigInt< N >::operator T ( ) const
inlineexplicitconstexpr

Cast to any primitive unsigned integer

◆ operator T() [2/2]

template<int N>
template<typename T, std::enable_if_t<(std::is_integral_v< T > &&!std::is_unsigned_v< T > &&sizeof(T)<=8 &&!std::is_same_v< T, bool >), int > = 0>
TLFLOAT_INLINE tlfloat::BigInt< N >::operator T ( ) const
inlineexplicitconstexpr

Cast to any primitive signed integer

◆ operator!=() [1/2]

template<int N>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator!= ( BigInt< N > const & rhs) const
inlineconstexpr

◆ operator!=() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator!= ( const rhstype & rhs) const
inlineconstexpr

◆ operator%() [1/2]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator% ( const BigInt< N > & rhs) const
inlineconstexpr

◆ operator%() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator% ( const rhstype & rhs) const
inlineconstexpr

◆ operator%=()

template<int N>
template<typename rhstype>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator%= ( const rhstype & rhs)
inlineconstexpr

◆ operator&() [1/2]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator& ( const BigInt< N > & rhs) const
inlineconstexpr

◆ operator&() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator& ( const rhstype & rhs) const
inlineconstexpr

◆ operator&=()

template<int N>
template<typename rhstype>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator&= ( const rhstype & rhs)
inlineconstexpr

◆ operator*() [1/2]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator* ( const BigInt< N > & rhs) const
inlineconstexpr

◆ operator*() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator* ( const rhstype & rhs) const
inlineconstexpr

◆ operator*=()

template<int N>
template<typename rhstype>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator*= ( const rhstype & rhs)
inlineconstexpr

◆ operator+() [1/3]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator+ ( ) const
inlineconstexpr

◆ operator+() [2/3]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator+ ( const BigInt< N > & rhs) const
inlineconstexpr

◆ operator+() [3/3]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator+ ( const rhstype & rhs) const
inlineconstexpr

◆ operator++() [1/2]

template<int N>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator++ ( )
inlineconstexpr

◆ operator++() [2/2]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator++ ( int )
inlineconstexpr

◆ operator+=()

template<int N>
template<typename rhstype>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator+= ( const rhstype & rhs)
inlineconstexpr

◆ operator-() [1/3]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator- ( ) const
inlineconstexpr

◆ operator-() [2/3]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator- ( const BigInt< N > & rhs) const
inlineconstexpr

◆ operator-() [3/3]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator- ( const rhstype & rhs) const
inlineconstexpr

◆ operator--() [1/2]

template<int N>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator-- ( )
inlineconstexpr

◆ operator--() [2/2]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator-- ( int )
inlineconstexpr

◆ operator-=()

template<int N>
template<typename rhstype>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator-= ( const rhstype & rhs)
inlineconstexpr

◆ operator/() [1/2]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator/ ( const BigInt< N > & rhs) const
inlineconstexpr

◆ operator/() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator/ ( const rhstype & rhs) const
inlineconstexpr

◆ operator/=()

template<int N>
template<typename rhstype>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator/= ( const rhstype & rhs)
inlineconstexpr

◆ operator<() [1/2]

template<int N>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator< ( BigInt< N > const & rhs) const
inlineconstexpr

◆ operator<() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator< ( const rhstype & rhs) const
inlineconstexpr

◆ operator<<()

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator<< ( int n) const
inlineconstexpr

◆ operator<<=()

template<int N>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator<<= ( int n)
inlineconstexpr

◆ operator<=() [1/2]

template<int N>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator<= ( BigInt< N > const & rhs) const
inlineconstexpr

◆ operator<=() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator<= ( const rhstype & rhs) const
inlineconstexpr

◆ operator=() [1/2]

template<int N>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator= ( const BigInt< N > & ip)
constexprdefault

◆ operator=() [2/2]

template<int N>
template<typename srctype>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator= ( const srctype & s)
inlineconstexpr

◆ operator==() [1/2]

template<int N>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator== ( BigInt< N > const & rhs) const
inlineconstexpr

◆ operator==() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator== ( const rhstype & rhs) const
inlineconstexpr

◆ operator>() [1/2]

template<int N>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator> ( BigInt< N > const & rhs) const
inlineconstexpr

◆ operator>() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator> ( const rhstype & rhs) const
inlineconstexpr

◆ operator>=() [1/2]

template<int N>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator>= ( BigInt< N > const & rhs) const
inlineconstexpr

◆ operator>=() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator>= ( const rhstype & rhs) const
inlineconstexpr

◆ operator>>()

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator>> ( int n) const
inlineconstexpr

◆ operator>>=()

template<int N>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator>>= ( int n)
inlineconstexpr

◆ operator^() [1/2]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator^ ( const BigInt< N > & rhs) const
inlineconstexpr

◆ operator^() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator^ ( const rhstype & rhs) const
inlineconstexpr

◆ operator^=()

template<int N>
template<typename rhstype>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator^= ( const rhstype & rhs)
inlineconstexpr

◆ operator|() [1/2]

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator| ( const BigInt< N > & rhs) const
inlineconstexpr

◆ operator|() [2/2]

template<int N>
template<typename rhstype, std::enable_if_t<(std::is_integral_v< rhstype >||(sizeof(rhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< rhstype >)), int > = 0>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator| ( const rhstype & rhs) const
inlineconstexpr

◆ operator|=()

template<int N>
template<typename rhstype>
TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator|= ( const rhstype & rhs)
inlineconstexpr

◆ operator~()

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator~ ( ) const
inlineconstexpr

◆ pow()

template<int N>
TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::pow ( BigUInt< N > e,
const BigUInt< N > & m = 0,
BigUInt< N > recm = 0 ) const
inlineconstexpr

◆ reciprocal()

template<int N>
TLFLOAT_INLINE BigUInt< N > tlfloat::BigInt< N >::reciprocal ( ) const
inlineconstexpr

◆ snprint()

template<int N>
TLFLOAT_NOINLINE int tlfloat::BigInt< N >::snprint ( char * cbuf,
size_t bufsize,
BigInt< N > value,
char typespec = 'd',
int width = 0,
int precision = -1,
int base = 10,
int nbits = 1 << N,
bool flag_sign = false,
bool flag_blank = false,
bool flag_alt = false,
bool flag_left = false,
bool flag_zero = false,
bool flag_upper = false,
bool flag_unsigned = false,
bool flag_ptr = false,
const char * prefix = "" )
inlinestatic

◆ BigInt

template<int N>
template<int>
friend class BigInt
friend

◆ BigUInt

template<int N>
template<int>
friend class BigUInt
friend

◆ operator!=

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend bool operator!= ( const lhstype & lhs,
const BigInt< N > & rhs )
friend

◆ operator%

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend BigInt operator% ( const lhstype c,
const BigInt< N > & rhs )
friend

◆ operator&

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend BigInt operator& ( const lhstype c,
const BigInt< N > & rhs )
friend

◆ operator*

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend BigInt operator* ( const lhstype c,
const BigInt< N > & rhs )
friend

◆ operator+

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend BigInt operator+ ( const lhstype c,
const BigInt< N > & rhs )
friend

◆ operator-

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend BigInt operator- ( const lhstype c,
const BigInt< N > & rhs )
friend

◆ operator/

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend BigInt operator/ ( const lhstype c,
const BigInt< N > & rhs )
friend

◆ operator<

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend bool operator< ( const lhstype & lhs,
const BigInt< N > & rhs )
friend

◆ operator<=

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend bool operator<= ( const lhstype & lhs,
const BigInt< N > & rhs )
friend

◆ operator==

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend bool operator== ( const lhstype & lhs,
const BigInt< N > & rhs )
friend

◆ operator>

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend bool operator> ( const lhstype & lhs,
const BigInt< N > & rhs )
friend

◆ operator>=

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend bool operator>= ( const lhstype & lhs,
const BigInt< N > & rhs )
friend

◆ operator^

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend BigInt operator^ ( const lhstype c,
const BigInt< N > & rhs )
friend

◆ operator|

template<int N>
template<typename lhstype, std::enable_if_t<(std::is_integral_v< lhstype >||(sizeof(lhstype)<(8<<(N - 6)) &&!std::is_floating_point_v< lhstype >)), int > = 0>
TLFLOAT_INLINE friend BigInt operator| ( const lhstype c,
const BigInt< N > & rhs )
friend

The documentation for this class was generated from the following file: