ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
BigInt Class Reference

#include <bigint.hh>

Public Types

enum  { small = sizeof(ullong_t) / sizeof(onedig_t) }
typedef unsigned short onedig_t
typedef unsigned twodig_t
typedef long llong_t
typedef unsigned long ullong_t

Public Member Functions

 ~BigInt ()
 BigInt ()
 BigInt (int)
 BigInt (unsigned)
 BigInt (long signed int x)
 BigInt (long unsigned int x)
 BigInt (llong_t)
 BigInt (ullong_t)
 BigInt (BigInt const &)
 BigInt (BigInt &&)
 BigInt (char const *, onedig_t=10)
BigInt & operator= (BigInt const &)
BigInt & operator= (BigInt &&)
char const * scan_on (char const *, onedig_t=10)
char const * scan (char const *, onedig_t=10)
unsigned digits (onedig_t=10) const
char * as_string (char *, unsigned, onedig_t=10) const
bool dump (unsigned char *, unsigned) const
void load (unsigned char const *, unsigned)
bool is_int64 () const
bool is_uint64 () const
uint64_t to_uint64 () const
int64_t to_int64 () const
int compare (llong_t) const
int compare (ullong_t) const
int compare (BigInt const &) const
int compare (long n) const
int compare (unsigned long n) const
int compare (int n) const
int compare (unsigned n) const
bool is_zero () const
bool is_positive () const
bool is_negative () const
bool is_odd () const
bool is_even () const
BigInt & negate ()
BigInt & operator++ ()
BigInt & operator-- ()
unsigned floorPow2 () const
void swap (BigInt &other)

Static Public Member Functions

static void div (BigInt const &, BigInt const &, BigInt &quot, BigInt &rem)
static BigInt power2 (unsigned n)
static BigInt power2m1 (unsigned n)

Friends

BigInt operator- (BigInt b)

Member Typedef Documentation

◆ llong_t

typedef long BigInt::llong_t

◆ onedig_t

typedef unsigned short BigInt::onedig_t

◆ twodig_t

typedef unsigned BigInt::twodig_t

◆ ullong_t

typedef unsigned long BigInt::ullong_t

Member Enumeration Documentation

◆ anonymous enum

anonymous enum
Enumerator
small 

Constructor & Destructor Documentation

◆ ~BigInt()

BigInt::~BigInt ( )

◆ BigInt() [1/10]

BigInt::BigInt ( )

◆ BigInt() [2/10]

BigInt::BigInt ( int n)

◆ BigInt() [3/10]

BigInt::BigInt ( unsigned u)

◆ BigInt() [4/10]

BigInt::BigInt ( long signed int x)

◆ BigInt() [5/10]

BigInt::BigInt ( long unsigned int x)

◆ BigInt() [6/10]

BigInt::BigInt ( llong_t l)

◆ BigInt() [7/10]

BigInt::BigInt ( ullong_t ul)

◆ BigInt() [8/10]

BigInt::BigInt ( BigInt const & y)

◆ BigInt() [9/10]

BigInt::BigInt ( BigInt && y)

◆ BigInt() [10/10]

BigInt::BigInt ( char const * s,
onedig_t b = 10 )

Member Function Documentation

◆ as_string()

char * BigInt::as_string ( char * p,
unsigned l,
onedig_t b = 10 ) const

◆ compare() [1/7]

int BigInt::compare ( BigInt const & b) const

◆ compare() [2/7]

int BigInt::compare ( int n) const
inline

◆ compare() [3/7]

int BigInt::compare ( llong_t b) const

◆ compare() [4/7]

int BigInt::compare ( long n) const
inline

◆ compare() [5/7]

int BigInt::compare ( ullong_t b) const

◆ compare() [6/7]

int BigInt::compare ( unsigned long n) const
inline

◆ compare() [7/7]

int BigInt::compare ( unsigned n) const
inline

◆ digits()

unsigned BigInt::digits ( onedig_t b = 10) const

◆ div()

void BigInt::div ( BigInt const & x,
BigInt const & y,
BigInt & quot,
BigInt & rem )
static

◆ dump()

bool BigInt::dump ( unsigned char * p,
unsigned n ) const

◆ floorPow2()

unsigned BigInt::floorPow2 ( ) const

◆ is_even()

bool BigInt::is_even ( ) const
inline

◆ is_int64()

bool BigInt::is_int64 ( ) const

◆ is_negative()

bool BigInt::is_negative ( ) const
inline

◆ is_odd()

bool BigInt::is_odd ( ) const
inline

◆ is_positive()

bool BigInt::is_positive ( ) const
inline

◆ is_uint64()

bool BigInt::is_uint64 ( ) const
inline

◆ is_zero()

bool BigInt::is_zero ( ) const
inline

◆ load()

void BigInt::load ( unsigned char const * p,
unsigned n )

◆ negate()

BigInt & BigInt::negate ( )
inline

◆ operator++()

BigInt & BigInt::operator++ ( )
inline

◆ operator--()

BigInt & BigInt::operator-- ( )
inline

◆ operator=() [1/2]

BigInt & BigInt::operator= ( BigInt && y)

◆ operator=() [2/2]

BigInt & BigInt::operator= ( BigInt const & y)

◆ power2()

BigInt BigInt::power2 ( unsigned n)
inlinestatic

◆ power2m1()

BigInt BigInt::power2m1 ( unsigned n)
inlinestatic

◆ scan()

char const * BigInt::scan ( char const * s,
onedig_t b = 10 )

◆ scan_on()

char const * BigInt::scan_on ( char const * s,
onedig_t b = 10 )

◆ swap()

void BigInt::swap ( BigInt & other)
inline

◆ to_int64()

int64_t BigInt::to_int64 ( ) const

◆ to_uint64()

uint64_t BigInt::to_uint64 ( ) const

◆ operator-

BigInt operator- ( BigInt b)
friend

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