116 std::string
toString(
int base = 10)
const;
124 const mpz_class &
getMPZ()
const;
143 e(mpfr_prec_t precision = 128);
150 euler(mpfr_prec_t precision = 128);
152 catalan(mpfr_prec_t precision = 128);
154 epsilon(mpfr_prec_t precision = 128);
286 static Number pi(
size_t precision = 128);
287 static Number e(
size_t precision = 128);
288 static Number phi(
size_t precision = 128);
289 static Number ln2(
size_t precision = 128);
300 Number(
double d,
bool asInteger =
false);
301 Number(
const std::string &s,
302 bool asInteger =
false);
HighPrecisionInteger operator+(const HighPrecisionInteger &other) const
HighPrecisionInteger & operator++()
HighPrecisionInteger sqrt() const
HighPrecisionInteger operator|(const HighPrecisionInteger &other) const
bool operator>(const HighPrecisionInteger &other) const
HighPrecisionInteger operator~() const
static HighPrecisionInteger gcd(const HighPrecisionInteger &a, const HighPrecisionInteger &b)
HighPrecisionInteger operator%(const HighPrecisionInteger &other) const
HighPrecisionInteger root(unsigned long n) const
const mpz_class & getMPZ() const
HighPrecisionInteger & operator*=(const HighPrecisionInteger &other)
bool isDivisibleBy(const HighPrecisionInteger &d) const
HighPrecisionInteger & operator+=(const HighPrecisionInteger &other)
HighPrecisionInteger operator&(const HighPrecisionInteger &other) const
bool isProbablePrime(int reps=25) const
HighPrecisionInteger operator^(const HighPrecisionInteger &other) const
HighPrecisionInteger abs() const
HighPrecisionInteger nextBelow() const
bool operator<=(const HighPrecisionInteger &other) const
HighPrecisionInteger operator>>(unsigned long bits) const
HighPrecisionInteger operator<<(unsigned long bits) const
HighPrecisionInteger operator*(const HighPrecisionInteger &other) const
HighPrecisionInteger safeSqrt() const
const mpz_t * get_mpz_t() const
bool operator<(const HighPrecisionInteger &other) const
HighPrecisionInteger & operator%=(const HighPrecisionInteger &other)
unsigned long toULong() const
static HighPrecisionInteger factorial(unsigned long n)
std::string toString(int base=10) const
bool operator==(const HighPrecisionInteger &other) const
HighPrecisionInteger pow(unsigned long exp) const
HighPrecisionInteger & operator--()
HighPrecisionInteger operator-() const
long long toLongLong() const
static HighPrecisionInteger lcm(const HighPrecisionInteger &a, const HighPrecisionInteger &b)
bool operator>=(const HighPrecisionInteger &other) const
HighPrecisionInteger nextAbove() const
~HighPrecisionInteger()=default
HighPrecisionInteger & operator=(const HighPrecisionInteger &other)
static HighPrecisionInteger fibonacci(unsigned long n)
HighPrecisionInteger operator/(const HighPrecisionInteger &other) const
bool operator!=(const HighPrecisionInteger &other) const
HighPrecisionInteger & operator/=(const HighPrecisionInteger &other)
HighPrecisionInteger & operator-=(const HighPrecisionInteger &other)
std::string toString() const
HighPrecisionReal atanh() const
static HighPrecisionReal ln10(mpfr_prec_t precision=128)
HighPrecisionReal safeSqrt() const
HighPrecisionReal ln() const
HighPrecisionReal asinh() const
void setPrecision(mpfr_prec_t precision)
HighPrecisionReal tanh() const
static HighPrecisionReal atan2(const HighPrecisionReal &y, const HighPrecisionReal &x)
HighPrecisionReal acsc() const
HighPrecisionReal sech() const
HighPrecisionReal cot() const
HighPrecisionReal abs() const
HighPrecisionReal acosh() const
HighPrecisionReal & operator+=(const HighPrecisionReal &other)
HighPrecisionReal & operator/=(const HighPrecisionReal &other)
bool operator!=(const HighPrecisionReal &other) const
HighPrecisionReal asech() const
HighPrecisionReal asec() const
HighPrecisionReal & operator=(const HighPrecisionReal &other)
bool operator<(const HighPrecisionReal &other) const
static HighPrecisionReal euler(mpfr_prec_t precision=128)
HighPrecisionReal operator*(const HighPrecisionReal &other) const
static HighPrecisionReal epsilon(mpfr_prec_t precision=128)
HighPrecisionReal acsch() const
HighPrecisionReal acot() const
HighPrecisionReal sqrt() const
bool operator>=(const HighPrecisionReal &other) const
HighPrecisionReal nextAbove() const
long long toLongLong() const
HighPrecisionReal operator+(const HighPrecisionReal &other) const
HighPrecisionReal sec() const
HighPrecisionReal exp() const
static HighPrecisionReal pi(mpfr_prec_t precision=128)
bool operator==(const HighPrecisionReal &other) const
HighPrecisionReal tan() const
bool operator>(const HighPrecisionReal &other) const
bool operator<=(const HighPrecisionReal &other) const
HighPrecisionReal sin() const
static HighPrecisionReal log2_e(mpfr_prec_t precision=128)
HighPrecisionReal & operator-=(const HighPrecisionReal &other)
HighPrecisionReal ceil() const
HighPrecisionReal acos() const
HighPrecisionReal cos() const
HighPrecisionReal nextBelow() const
HighPrecisionReal floor() const
Integer toInteger() const
bool isPositiveInfinity() const
HighPrecisionReal operator/(const HighPrecisionReal &other) const
HighPrecisionReal csch() const
bool isNegativeInfinity() const
HighPrecisionReal asin() const
static HighPrecisionReal log10_e(mpfr_prec_t precision=128)
HighPrecisionReal atan() const
HighPrecisionReal lg() const
HighPrecisionReal lb() const
HighPrecisionReal & operator*=(const HighPrecisionReal &other)
static HighPrecisionReal phi(mpfr_prec_t precision=128)
HighPrecisionReal pow(const HighPrecisionReal &exp) const
HighPrecisionReal operator-() const
static HighPrecisionReal e(mpfr_prec_t precision=128)
HighPrecisionReal sinh() const
static HighPrecisionReal catalan(mpfr_prec_t precision=128)
HighPrecisionReal csc() const
HighPrecisionReal log(const HighPrecisionReal &base) const
HighPrecisionReal round() const
mpfr_prec_t getPrecision() const
static HighPrecisionReal ln2(mpfr_prec_t precision=128)
HighPrecisionReal coth() const
HighPrecisionReal acoth() const
HighPrecisionReal cosh() const
Number operator%(const Number &other) const
const HighPrecisionInteger & getInteger() const
Number pow(const Number &exp) const
bool operator!=(const Number &other) const
Number operator|(const Number &other) const
Number & operator%=(const Number &other)
Number operator>>(unsigned long bits) const
Number & operator+=(const Number &other)
static Number ln10(size_t precision=128)
HighPrecisionInteger intValue
std::string toString() const
Number operator<<(unsigned long bits) const
Number & operator/=(const Number &other)
HighPrecisionInteger toInteger() const
bool operator>=(const Number &other) const
HighPrecisionReal toReal(mpfr_prec_t precision=128) const
HighPrecisionReal realValue
static Number atan2(const Number &y, const Number &x)
static Number phi(size_t precision=128)
static Number log2_e(size_t precision=128)
bool isPositiveInfinity() const
Number operator^(const Number &other) const
bool operator<(const Number &other) const
bool operator==(const Number &other) const
bool operator>(const Number &other) const
static Number pi(size_t precision=128)
Number & operator=(const Number &other)
Number operator&(const Number &other) const
const HighPrecisionReal & getReal() const
Number & operator*=(const Number &other)
Number log(const Number &base) const
bool isNegativeInfinity() const
bool operator<=(const Number &other) const
Number operator+(const Number &other) const
static Number epsilon(size_t precision=128)
Number operator*(const Number &other) const
static Number e(size_t precision=128)
Number & operator-=(const Number &other)
static Number log10_e(size_t precision=128)
static Number ln2(size_t precision=128)
Number operator/(const Number &other) const
static Number positiveInfinity()
static Number negativeInfinity()
HighPrecisionInteger Integer