SMTStabilizer API
Public API documentation for SMTStabilizer
Loading...
Searching...
No Matches
stabilizer::parser::HighPrecisionInteger Class Reference

#include <number.h>

Public Member Functions

 HighPrecisionInteger ()
 
 HighPrecisionInteger (int i)
 
 HighPrecisionInteger (long i)
 
 HighPrecisionInteger (unsigned long i)
 
 HighPrecisionInteger (unsigned long long i)
 
 HighPrecisionInteger (double d)
 
 HighPrecisionInteger (const std::string &s, int base=10)
 
 HighPrecisionInteger (const char *s, int base=10)
 
 HighPrecisionInteger (const HighPrecisionInteger &other)
 
 HighPrecisionInteger (const mpz_t z)
 
HighPrecisionIntegeroperator= (const HighPrecisionInteger &other)
 
 ~HighPrecisionInteger ()=default
 
HighPrecisionInteger operator+ (const HighPrecisionInteger &other) const
 
HighPrecisionInteger operator- (const HighPrecisionInteger &other) const
 
HighPrecisionInteger operator- () const
 
HighPrecisionInteger operator* (const HighPrecisionInteger &other) const
 
HighPrecisionInteger operator/ (const HighPrecisionInteger &other) const
 
HighPrecisionInteger operator% (const HighPrecisionInteger &other) const
 
HighPrecisionIntegeroperator+= (const HighPrecisionInteger &other)
 
HighPrecisionIntegeroperator-= (const HighPrecisionInteger &other)
 
HighPrecisionIntegeroperator*= (const HighPrecisionInteger &other)
 
HighPrecisionIntegeroperator/= (const HighPrecisionInteger &other)
 
HighPrecisionIntegeroperator%= (const HighPrecisionInteger &other)
 
HighPrecisionIntegeroperator++ ()
 
HighPrecisionInteger operator++ (int)
 
HighPrecisionIntegeroperator-- ()
 
HighPrecisionInteger operator-- (int)
 
bool operator== (const HighPrecisionInteger &other) const
 
bool operator!= (const HighPrecisionInteger &other) const
 
bool operator< (const HighPrecisionInteger &other) const
 
bool operator<= (const HighPrecisionInteger &other) const
 
bool operator> (const HighPrecisionInteger &other) const
 
bool operator>= (const HighPrecisionInteger &other) const
 
HighPrecisionInteger operator& (const HighPrecisionInteger &other) const
 
HighPrecisionInteger operator| (const HighPrecisionInteger &other) const
 
HighPrecisionInteger operator^ (const HighPrecisionInteger &other) const
 
HighPrecisionInteger operator~ () const
 
HighPrecisionInteger operator<< (unsigned long bits) const
 
HighPrecisionInteger operator>> (unsigned long bits) const
 
HighPrecisionInteger abs () const
 
HighPrecisionInteger pow (unsigned long exp) const
 
HighPrecisionInteger sqrt () const
 
HighPrecisionInteger safeSqrt () const
 
HighPrecisionInteger root (unsigned long n) const
 
bool isProbablePrime (int reps=25) const
 
bool isDivisibleBy (const HighPrecisionInteger &d) const
 
std::string toString (int base=10) const
 
int toInt () const
 
long toLong () const
 
unsigned long toULong () const
 
long long toLongLong () const
 
double toDouble () const
 
const mpz_class & getMPZ () const
 
mpz_class & getMPZ ()
 
const mpz_t * get_mpz_t () const
 
HighPrecisionInteger nextBelow () const
 
HighPrecisionInteger nextAbove () const
 

Static Public Member Functions

static HighPrecisionInteger factorial (unsigned long n)
 
static HighPrecisionInteger fibonacci (unsigned long n)
 
static HighPrecisionInteger gcd (const HighPrecisionInteger &a, const HighPrecisionInteger &b)
 
static HighPrecisionInteger lcm (const HighPrecisionInteger &a, const HighPrecisionInteger &b)
 

Private Attributes

mpz_class value
 

Detailed Description

Definition at line 43 of file number.h.

Constructor & Destructor Documentation

◆ HighPrecisionInteger() [1/10]

stabilizer::parser::HighPrecisionInteger::HighPrecisionInteger ( )

Definition at line 753 of file number.cpp.

Referenced by factorial(), fibonacci(), root(), safeSqrt(), and sqrt().

◆ HighPrecisionInteger() [2/10]

stabilizer::parser::HighPrecisionInteger::HighPrecisionInteger ( int  i)

Definition at line 755 of file number.cpp.

◆ HighPrecisionInteger() [3/10]

stabilizer::parser::HighPrecisionInteger::HighPrecisionInteger ( long  i)

Definition at line 757 of file number.cpp.

◆ HighPrecisionInteger() [4/10]

stabilizer::parser::HighPrecisionInteger::HighPrecisionInteger ( unsigned long  i)

Definition at line 759 of file number.cpp.

◆ HighPrecisionInteger() [5/10]

stabilizer::parser::HighPrecisionInteger::HighPrecisionInteger ( unsigned long long  i)

Definition at line 761 of file number.cpp.

◆ HighPrecisionInteger() [6/10]

stabilizer::parser::HighPrecisionInteger::HighPrecisionInteger ( double  d)

Definition at line 764 of file number.cpp.

◆ HighPrecisionInteger() [7/10]

stabilizer::parser::HighPrecisionInteger::HighPrecisionInteger ( const std::string &  s,
int  base = 10 
)

Definition at line 766 of file number.cpp.

References value.

◆ HighPrecisionInteger() [8/10]

stabilizer::parser::HighPrecisionInteger::HighPrecisionInteger ( const char *  s,
int  base = 10 
)

Definition at line 776 of file number.cpp.

References value.

◆ HighPrecisionInteger() [9/10]

stabilizer::parser::HighPrecisionInteger::HighPrecisionInteger ( const HighPrecisionInteger other)

Definition at line 786 of file number.cpp.

◆ HighPrecisionInteger() [10/10]

stabilizer::parser::HighPrecisionInteger::HighPrecisionInteger ( const mpz_t  z)

Definition at line 707 of file number.cpp.

References value.

◆ ~HighPrecisionInteger()

stabilizer::parser::HighPrecisionInteger::~HighPrecisionInteger ( )
default

Member Function Documentation

◆ abs()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::abs ( ) const

Definition at line 973 of file number.cpp.

References value.

Referenced by stabilizer::parser::Number::abs().

◆ factorial()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::factorial ( unsigned long  n)
static

Definition at line 716 of file number.cpp.

References HighPrecisionInteger().

◆ fibonacci()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::fibonacci ( unsigned long  n)
static

Definition at line 724 of file number.cpp.

References HighPrecisionInteger().

◆ gcd()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::gcd ( const HighPrecisionInteger a,
const HighPrecisionInteger b 
)
static

Definition at line 738 of file number.cpp.

References value.

◆ get_mpz_t()

const mpz_t * stabilizer::parser::HighPrecisionInteger::get_mpz_t ( ) const

Definition at line 711 of file number.cpp.

References value.

◆ getMPZ() [1/2]

mpz_class & stabilizer::parser::HighPrecisionInteger::getMPZ ( )

Definition at line 1078 of file number.cpp.

References value.

◆ getMPZ() [2/2]

const mpz_class & stabilizer::parser::HighPrecisionInteger::getMPZ ( ) const

Definition at line 1076 of file number.cpp.

References value.

Referenced by stabilizer::parser::HighPrecisionReal::HighPrecisionReal().

◆ isDivisibleBy()

bool stabilizer::parser::HighPrecisionInteger::isDivisibleBy ( const HighPrecisionInteger d) const

Definition at line 1018 of file number.cpp.

References value.

◆ isProbablePrime()

bool stabilizer::parser::HighPrecisionInteger::isProbablePrime ( int  reps = 25) const

Definition at line 1014 of file number.cpp.

References value.

◆ lcm()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::lcm ( const HighPrecisionInteger a,
const HighPrecisionInteger b 
)
static

Definition at line 745 of file number.cpp.

References value.

◆ nextAbove()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::nextAbove ( ) const

Definition at line 1086 of file number.cpp.

References value.

Referenced by stabilizer::parser::Number::nextAbove().

◆ nextBelow()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::nextBelow ( ) const

Definition at line 1080 of file number.cpp.

References value.

Referenced by stabilizer::parser::Number::nextBelow().

◆ operator!=()

bool stabilizer::parser::HighPrecisionInteger::operator!= ( const HighPrecisionInteger other) const

Definition at line 910 of file number.cpp.

References value.

◆ operator%()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator% ( const HighPrecisionInteger other) const

Definition at line 837 of file number.cpp.

References value.

◆ operator%=()

HighPrecisionInteger & stabilizer::parser::HighPrecisionInteger::operator%= ( const HighPrecisionInteger other)

Definition at line 874 of file number.cpp.

References value.

◆ operator&()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator& ( const HighPrecisionInteger other) const

Definition at line 932 of file number.cpp.

References value.

◆ operator*()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator* ( const HighPrecisionInteger other) const

Definition at line 820 of file number.cpp.

References value.

◆ operator*=()

HighPrecisionInteger & stabilizer::parser::HighPrecisionInteger::operator*= ( const HighPrecisionInteger other)

Definition at line 859 of file number.cpp.

References value.

◆ operator+()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator+ ( const HighPrecisionInteger other) const

Definition at line 800 of file number.cpp.

References value.

◆ operator++() [1/2]

HighPrecisionInteger & stabilizer::parser::HighPrecisionInteger::operator++ ( )

Definition at line 883 of file number.cpp.

References value.

◆ operator++() [2/2]

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator++ ( int  )

Definition at line 888 of file number.cpp.

References value.

◆ operator+=()

HighPrecisionInteger & stabilizer::parser::HighPrecisionInteger::operator+= ( const HighPrecisionInteger other)

Definition at line 847 of file number.cpp.

References value.

◆ operator-() [1/2]

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator- ( ) const

Definition at line 813 of file number.cpp.

References value.

◆ operator-() [2/2]

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator- ( const HighPrecisionInteger other) const

Definition at line 807 of file number.cpp.

References value.

◆ operator--() [1/2]

HighPrecisionInteger & stabilizer::parser::HighPrecisionInteger::operator-- ( )

Definition at line 894 of file number.cpp.

References value.

◆ operator--() [2/2]

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator-- ( int  )

Definition at line 899 of file number.cpp.

References value.

◆ operator-=()

HighPrecisionInteger & stabilizer::parser::HighPrecisionInteger::operator-= ( const HighPrecisionInteger other)

Definition at line 853 of file number.cpp.

References value.

◆ operator/()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator/ ( const HighPrecisionInteger other) const

Definition at line 827 of file number.cpp.

References value.

◆ operator/=()

HighPrecisionInteger & stabilizer::parser::HighPrecisionInteger::operator/= ( const HighPrecisionInteger other)

Definition at line 865 of file number.cpp.

References value.

◆ operator<()

bool stabilizer::parser::HighPrecisionInteger::operator< ( const HighPrecisionInteger other) const

Definition at line 914 of file number.cpp.

References value.

◆ operator<<()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator<< ( unsigned long  bits) const

Definition at line 958 of file number.cpp.

References value.

◆ operator<=()

bool stabilizer::parser::HighPrecisionInteger::operator<= ( const HighPrecisionInteger other) const

Definition at line 918 of file number.cpp.

References value.

◆ operator=()

HighPrecisionInteger & stabilizer::parser::HighPrecisionInteger::operator= ( const HighPrecisionInteger other)

Definition at line 791 of file number.cpp.

References value.

◆ operator==()

bool stabilizer::parser::HighPrecisionInteger::operator== ( const HighPrecisionInteger other) const

Definition at line 906 of file number.cpp.

References value.

◆ operator>()

bool stabilizer::parser::HighPrecisionInteger::operator> ( const HighPrecisionInteger other) const

Definition at line 922 of file number.cpp.

References value.

◆ operator>=()

bool stabilizer::parser::HighPrecisionInteger::operator>= ( const HighPrecisionInteger other) const

Definition at line 926 of file number.cpp.

References value.

◆ operator>>()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator>> ( unsigned long  bits) const

Definition at line 966 of file number.cpp.

References value.

◆ operator^()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator^ ( const HighPrecisionInteger other) const

Definition at line 946 of file number.cpp.

References value.

◆ operator|()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator| ( const HighPrecisionInteger other) const

Definition at line 939 of file number.cpp.

References value.

◆ operator~()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::operator~ ( ) const

Definition at line 952 of file number.cpp.

References value.

◆ pow()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::pow ( unsigned long  exp) const

Definition at line 979 of file number.cpp.

References value.

Referenced by stabilizer::parser::Number::pow().

◆ root()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::root ( unsigned long  n) const

Definition at line 1002 of file number.cpp.

References HighPrecisionInteger(), and value.

◆ safeSqrt()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::safeSqrt ( ) const

Definition at line 994 of file number.cpp.

References HighPrecisionInteger(), and value.

Referenced by stabilizer::parser::Number::safeSqrt().

◆ sqrt()

HighPrecisionInteger stabilizer::parser::HighPrecisionInteger::sqrt ( ) const

Definition at line 985 of file number.cpp.

References HighPrecisionInteger(), and value.

Referenced by stabilizer::parser::Number::sqrt().

◆ toDouble()

double stabilizer::parser::HighPrecisionInteger::toDouble ( ) const

Definition at line 1073 of file number.cpp.

References value.

◆ toInt()

int stabilizer::parser::HighPrecisionInteger::toInt ( ) const

Definition at line 1036 of file number.cpp.

References value.

Referenced by stabilizer::parser::Value::repeatStr(), and stabilizer::parser::Value::substr().

◆ toLong()

long stabilizer::parser::HighPrecisionInteger::toLong ( ) const

Definition at line 1043 of file number.cpp.

References value.

◆ toLongLong()

long long stabilizer::parser::HighPrecisionInteger::toLongLong ( ) const

Definition at line 1057 of file number.cpp.

References toString(), and value.

◆ toString()

◆ toULong()

Member Data Documentation

◆ value


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