#include <BigNum.hxx>
Public Member Functions | |
| ~BigNum () | |
| BigNum () | |
| BigNum (uint32_t u, bool neg) | |
| BigNum (uint64_t u, bool neg) | |
| BigNum (uint32_t u) | |
| BigNum (uint64_t u) | |
| BigNum (int32_t i) | |
| BigNum (int64_t i) | |
| BigNum (const std::string &s, uint32_t radix=0) | |
| BigNum (const BigNum &) | |
| BigNum | operator+ (const BigNum &) const |
| BigNum | operator- (const BigNum &) const |
| BigNum | operator * (const BigNum &) const |
| BigNum | operator/ (const BigNum &) const |
| BigNum | operator% (const BigNum &) const |
| BigNum & | operator+= (const BigNum &other) |
| BigNum & | operator-= (const BigNum &other) |
| BigNum & | operator *= (const BigNum &other) |
| BigNum & | operator/= (const BigNum &other) |
| BigNum & | operator%= (const BigNum &other) |
| BigNum & | operator= (const BigNum &) |
| BigNum | abs () const |
| BigNum | neg () const |
| BigNum | operator- () const |
| int | cmp (const BigNum &other) const |
| bool | operator< (const BigNum &other) const |
| bool | operator<= (const BigNum &other) const |
| bool | operator> (const BigNum &other) const |
| bool | operator>= (const BigNum &other) const |
| bool | operator== (const BigNum &other) const |
| bool | operator!= (const BigNum &other) const |
| BigNum | operator<< (size_t n) |
| BigNum | operator>> (size_t n) |
| BigNum & | operator<<= (size_t n) |
| BigNum & | operator>>= (size_t n) |
| std::string | asString (uint32_t radix=10) const |
| void | toStream (std::ostream &strm, uint32_t radix=10) const |
| void | fromStream (std::istream &strm, uint32_t radix=10) |
| uint32_t | as_uint32 () const |
| uint64_t | as_uint64 () const |
Friends | |
| struct | nvec |
Definition at line 49 of file BigNum.hxx.
| sherpa::BigNum::~BigNum | ( | ) |
Definition at line 396 of file BigNum.cxx.
| sherpa::BigNum::BigNum | ( | ) | [inline] |
Definition at line 85 of file BigNum.hxx.
Referenced by asString(), operator *(), operator%(), operator+(), operator-(), operator/(), operator<<(), and operator>>().
| sherpa::BigNum::BigNum | ( | uint32_t | u, | |
| bool | neg | |||
| ) | [inline] |
Definition at line 92 of file BigNum.hxx.
| sherpa::BigNum::BigNum | ( | uint64_t | u, | |
| bool | neg | |||
| ) |
| sherpa::BigNum::BigNum | ( | uint32_t | u | ) | [inline] |
Definition at line 110 of file BigNum.hxx.
| sherpa::BigNum::BigNum | ( | uint64_t | u | ) |
| sherpa::BigNum::BigNum | ( | int32_t | i | ) | [inline] |
Definition at line 117 of file BigNum.hxx.
| sherpa::BigNum::BigNum | ( | int64_t | i | ) |
| sherpa::BigNum::BigNum | ( | const std::string & | s, | |
| uint32_t | radix = 0 | |||
| ) |
Definition at line 512 of file BigNum.cxx.
| sherpa::BigNum::BigNum | ( | const BigNum & | ) |
| BigNum sherpa::BigNum::abs | ( | ) | const |
| uint32_t sherpa::BigNum::as_uint32 | ( | ) | const [inline] |
Definition at line 226 of file BigNum.hxx.
| uint64_t sherpa::BigNum::as_uint64 | ( | ) | const [inline] |
Definition at line 231 of file BigNum.hxx.
| std::string sherpa::BigNum::asString | ( | uint32_t | radix = 10 |
) | const |
Definition at line 743 of file BigNum.cxx.
References BigNum(), getDigit(), oneDigit, and s.
Referenced by toStream().
| int sherpa::BigNum::cmp | ( | const BigNum & | other | ) | const |
Definition at line 684 of file BigNum.cxx.
References negative, and sherpa::vu_cmp().
Referenced by operator!=(), operator<(), operator<=(), operator==(), operator>(), and operator>=().
| void sherpa::BigNum::fromStream | ( | std::istream & | strm, | |
| uint32_t | radix = 10 | |||
| ) |
| BigNum sherpa::BigNum::neg | ( | ) | const |
Definition at line 621 of file BigNum.cxx.
References BigNum(), sherpa::nvec::len, negative, sherpa::nvec::vec, and sherpa::vu_mul().
Definition at line 147 of file BigNum.hxx.
| bool sherpa::BigNum::operator!= | ( | const BigNum & | other | ) | const [inline] |
Definition at line 663 of file BigNum.cxx.
References BigNum(), sherpa::nvec::len, sherpa::nvec::vec, and sherpa::vu_divqr().
Definition at line 159 of file BigNum.hxx.
Definition at line 566 of file BigNum.cxx.
References abs(), BigNum(), sherpa::nvec::len, max(), negative, sherpa::nvec::vec, and sherpa::vu_add().
Definition at line 135 of file BigNum.hxx.
| BigNum sherpa::BigNum::operator- | ( | ) | const [inline] |
Definition at line 589 of file BigNum.cxx.
References BigNum(), sherpa::nvec::len, max(), nDigits, negative, sherpa::nvec::vec, sherpa::vu_add(), sherpa::vu_cmp(), and sherpa::vu_sub().
Definition at line 141 of file BigNum.hxx.
Definition at line 638 of file BigNum.cxx.
References sherpa::excpt::BadValue, BigNum(), sherpa::nvec::len, negative, THROW, sherpa::nvec::vec, and sherpa::vu_divqr().
Definition at line 153 of file BigNum.hxx.
| bool sherpa::BigNum::operator< | ( | const BigNum & | other | ) | const [inline] |
| BigNum sherpa::BigNum::operator<< | ( | size_t | n | ) |
Definition at line 719 of file BigNum.cxx.
References BigNum(), sherpa::nvec::len, sherpa::nvec::vec, and sherpa::vu_lshift_bits().
| BigNum& sherpa::BigNum::operator<<= | ( | size_t | n | ) | [inline] |
Definition at line 210 of file BigNum.hxx.
| bool sherpa::BigNum::operator<= | ( | const BigNum & | other | ) | const [inline] |
| bool sherpa::BigNum::operator== | ( | const BigNum & | other | ) | const [inline] |
| bool sherpa::BigNum::operator> | ( | const BigNum & | other | ) | const [inline] |
| bool sherpa::BigNum::operator>= | ( | const BigNum & | other | ) | const [inline] |
| BigNum sherpa::BigNum::operator>> | ( | size_t | n | ) |
Definition at line 731 of file BigNum.cxx.
References BigNum(), sherpa::nvec::len, sherpa::nvec::vec, and sherpa::vu_rshift_bits().
| BigNum& sherpa::BigNum::operator>>= | ( | size_t | n | ) | [inline] |
Definition at line 215 of file BigNum.hxx.
| void sherpa::BigNum::toStream | ( | std::ostream & | strm, | |
| uint32_t | radix = 10 | |||
| ) | const |
Definition at line 826 of file BigNum.cxx.
References asString().
Referenced by sherpa::operator<<().
friend struct nvec [friend] |
Definition at line 50 of file BigNum.hxx.
1.4.7