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 BigInt & | operator= (const BigInt &ip)=default
constexpr TLFLOAT_INLINE BigInt & | operator++ ()
constexpr TLFLOAT_INLINE BigInt | operator++ (int)
constexpr TLFLOAT_INLINE BigInt & | operator-- ()
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 BigInt & | operator>>= (int n)
constexpr TLFLOAT_INLINE BigInt & | operator<<= (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 BigInt & | operator= (const srctype &s)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigInt & | operator+= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigInt & | operator-= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigInt & | operator*= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigInt & | operator/= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigInt & | operator%= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigInt & | operator&= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigInt & | operator|= (const rhstype &rhs)
template<typename rhstype>
constexpr TLFLOAT_INLINE BigInt & | operator^= (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 | ( |  | ) |

constexpr default

## 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 | ) |

inline constexpr

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 | ) |

inline constexpr

Cast from any primitive unsigned integer

## BigInt() [4/12]

template<int N>

TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt | ( | const BigUInt< N > & | up | ) |

inline explicit constexpr

## 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 | ) |

inline constexpr

## 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 | ) |

inline constexpr

## BigInt() [7/12]

template<int N>

TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt | ( | const BigInt< N > & | m | ) |

constexpr default

## 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 | ) |

inline constexpr

## 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 | ) |

inline explicit constexpr

## BigInt() [10/12]

template<int N>

TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt | ( | const uint64_t * | p | ) |

inline constexpr

## BigInt() [11/12]

template<int N>

TLFLOAT_INLINE tlfloat::BigInt< N >::BigInt | ( | double | d | ) |

inline explicit constexpr

## BigInt() [12/12]

template<int N>

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

inline constexpr

## Member Function Documentation

## abs()

template<int N>

TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::abs | ( |  | ) | const

inline constexpr

## compare()

template<int N>

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

inline constexpr

## divmod()

template<int N>

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

inline constexpr

## getWord()

template<int N>

TLFLOAT_INLINE int64_t tlfloat::BigInt< N >::getWord | ( | unsigned | idx | ) | const

inline constexpr

## isNegative()

template<int N>

TLFLOAT_INLINE bool tlfloat::BigInt< N >::isNegative | ( |  | ) | const

inline constexpr

## isZero()

template<int N>

TLFLOAT_INLINE bool tlfloat::BigInt< N >::isZero | ( |  | ) | const

inline constexpr

## operator BigUInt< N >()

template<int N>

TLFLOAT_INLINE tlfloat::BigInt< N >::operator BigUInt< N > | ( |  | ) | const

inline constexpr

## operator bool()

template<int N>

TLFLOAT_INLINE tlfloat::BigInt< N >::operator bool | ( |  | ) | const

inline explicit constexpr

## operator double()

template<int N>

TLFLOAT_INLINE tlfloat::BigInt< N >::operator double | ( |  | ) | const

inline explicit constexpr

## 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

inline explicit constexpr

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

inline explicit constexpr

Cast to any primitive signed integer

## operator!=() [1/2]

template<int N>

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

inline constexpr

## 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

inline constexpr

## operator%() [1/2]

template<int N>

TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator% | ( | const BigInt< N > & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator%=()

template<int N>
template<typename rhstype>

TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator%= | ( | const rhstype & | rhs | ) |

inline constexpr

## operator&() [1/2]

template<int N>

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

inline constexpr

## 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

inline constexpr

## operator&=()

template<int N>
template<typename rhstype>

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

inline constexpr

## operator*() [1/2]

template<int N>

TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator* | ( | const BigInt< N > & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator*=()

template<int N>
template<typename rhstype>

TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator*= | ( | const rhstype & | rhs | ) |

inline constexpr

## operator+() [1/3]

template<int N>

TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator+ | ( |  | ) | const

inline constexpr

## operator+() [2/3]

template<int N>

TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator+ | ( | const BigInt< N > & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator++() [1/2]

template<int N>

TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator++ | ( |  | ) |

inline constexpr

## operator++() [2/2]

template<int N>

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

inline constexpr

## operator+=()

template<int N>
template<typename rhstype>

TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator+= | ( | const rhstype & | rhs | ) |

inline constexpr

## operator-() [1/3]

template<int N>

TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator- | ( |  | ) | const

inline constexpr

## operator-() [2/3]

template<int N>

TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator- | ( | const BigInt< N > & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator--() [1/2]

template<int N>

TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator-- | ( |  | ) |

inline constexpr

## operator--() [2/2]

template<int N>

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

inline constexpr

## operator-=()

template<int N>
template<typename rhstype>

TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator-= | ( | const rhstype & | rhs | ) |

inline constexpr

## operator/() [1/2]

template<int N>

TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator/ | ( | const BigInt< N > & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator/=()

template<int N>
template<typename rhstype>

TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator/= | ( | const rhstype & | rhs | ) |

inline constexpr

## operator<() [1/2]

template<int N>

TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator< | ( | BigInt< N > const & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator<<()

template<int N>

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

inline constexpr

## operator<<=()

template<int N>

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

inline constexpr

## operator<=() [1/2]

template<int N>

TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator<= | ( | BigInt< N > const & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator=() [1/2]

template<int N>

TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator= | ( | const BigInt< N > & | ip | ) |

constexpr default

## operator=() [2/2]

template<int N>
template<typename srctype>

TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator= | ( | const srctype & | s | ) |

inline constexpr

## operator==() [1/2]

template<int N>

TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator== | ( | BigInt< N > const & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator>() [1/2]

template<int N>

TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator> | ( | BigInt< N > const & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator>=() [1/2]

template<int N>

TLFLOAT_INLINE bool tlfloat::BigInt< N >::operator>= | ( | BigInt< N > const & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator>>()

template<int N>

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

inline constexpr

## operator>>=()

template<int N>

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

inline constexpr

## operator^() [1/2]

template<int N>

TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator^ | ( | const BigInt< N > & | rhs | ) | const

inline constexpr

## 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

inline constexpr

## operator^=()

template<int N>
template<typename rhstype>

TLFLOAT_INLINE BigInt & tlfloat::BigInt< N >::operator^= | ( | const rhstype & | rhs | ) |

inline constexpr

## operator|() [1/2]

template<int N>

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

inline constexpr

## 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

inline constexpr

## operator|=()

template<int N>
template<typename rhstype>

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

inline constexpr

## operator~()

template<int N>

TLFLOAT_INLINE BigInt tlfloat::BigInt< N >::operator~ | ( |  | ) | const

inline constexpr

## pow()

template<int N>

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

inline constexpr

## reciprocal()

template<int N>

TLFLOAT_INLINE BigUInt< N > tlfloat::BigInt< N >::reciprocal | ( |  | ) | const

inline constexpr

## 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 = "" )

inline static

## Friends And Related Symbol Documentation

## 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:

- src/include/tlfloat/bigint.hpp