ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
bigint.hh File Reference
#include <cstdint>
#include <utility>
Include dependency graph for bigint.hh:
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Classes

class  BigInt

Macros

#define IN_PLACE_OPERATOR(TYPE)
#define OVERLOAD_IN_PLACE_OPERATOR(FROM, TO)
#define BINARY_ARITHMETIC_OPERATORS(OTHER)
#define COMPARISON_OPERATORS(OTHER)

Functions

BigInt operator+ (const BigInt &lhs, const BigInt &rhs)
BigInt operator- (const BigInt &lhs, const BigInt &rhs)
BigInt operator* (const BigInt &lhs, const BigInt &rhs)
BigInt operator/ (const BigInt &lhs, const BigInt &rhs)
BigInt operator% (const BigInt &lhs, const BigInt &rhs)
bool operator< (const BigInt &lhs, const BigInt &rhs)
bool operator> (const BigInt &lhs, const BigInt &rhs)
bool operator<= (const BigInt &lhs, const BigInt &rhs)
bool operator>= (const BigInt &lhs, const BigInt &rhs)
bool operator== (const BigInt &lhs, const BigInt &rhs)
bool operator!= (const BigInt &lhs, const BigInt &rhs)

Macro Definition Documentation

◆ BINARY_ARITHMETIC_OPERATORS

#define BINARY_ARITHMETIC_OPERATORS ( OTHER)
Value:
inline BigInt operator+(const BigInt &lhs, OTHER rhs) \
{ \
return BigInt(lhs) += rhs; \
} \
inline BigInt operator+(OTHER lhs, const BigInt &rhs) \
{ \
return BigInt(rhs) += lhs; \
} \
inline BigInt operator*(const BigInt &lhs, OTHER rhs) \
{ \
return BigInt(lhs) *= rhs; \
} \
inline BigInt operator*(OTHER lhs, const BigInt &rhs) \
{ \
return BigInt(rhs) *= lhs; \
} \
inline BigInt operator-(const BigInt &lhs, OTHER rhs) \
{ \
return BigInt(lhs) -= rhs; \
} \
inline BigInt operator/(const BigInt &lhs, OTHER rhs) \
{ \
return BigInt(lhs) /= rhs; \
} \
inline BigInt operator%(const BigInt &lhs, OTHER rhs) \
{ \
return BigInt(lhs) %= rhs; \
}
BigInt operator+(const BigInt &lhs, const BigInt &rhs)
Definition bigint.hh:341
BigInt operator*(const BigInt &lhs, const BigInt &rhs)
Definition bigint.hh:349
BigInt operator-(const BigInt &lhs, const BigInt &rhs)
Definition bigint.hh:345
BigInt operator%(const BigInt &lhs, const BigInt &rhs)
Definition bigint.hh:357
BigInt operator/(const BigInt &lhs, const BigInt &rhs)
Definition bigint.hh:353
Definition bigint.hh:58
@ OTHER
Definition goto_program.h:33

◆ COMPARISON_OPERATORS

#define COMPARISON_OPERATORS ( OTHER)

◆ IN_PLACE_OPERATOR

#define IN_PLACE_OPERATOR ( TYPE)
Value:
BigInt &operator+=(TYPE); \
BigInt &operator*=(TYPE); \
BigInt &operator/=(TYPE); \
BigInt &operator%=(TYPE);
#define TYPE(pre)
Definition frexp.c:51
guard2tc & operator-=(guard2tc &g1, const guard2tc &g2)
Definition irep2_guard.cpp:334

◆ OVERLOAD_IN_PLACE_OPERATOR

#define OVERLOAD_IN_PLACE_OPERATOR ( FROM,
TO )
Value:
BigInt &operator+=(FROM x) \
{ \
return operator+=(static_cast<TO>(x)); \
} \
BigInt &operator-=(FROM x) \
{ \
return operator-=(static_cast<TO>(x)); \
} \
BigInt &operator*=(FROM x) \
{ \
return operator*=(static_cast<TO>(x)); \
} \
BigInt &operator/=(FROM x) \
{ \
return operator/=(static_cast<TO>(x)); \
} \
BigInt &operator%=(FROM x) \
{ \
return operator%=(static_cast<TO>(x)); \
}

Function Documentation

◆ operator!=()

bool operator!= ( const BigInt & lhs,
const BigInt & rhs )
inline

◆ operator%()

BigInt operator% ( const BigInt & lhs,
const BigInt & rhs )
inline

◆ operator*()

BigInt operator* ( const BigInt & lhs,
const BigInt & rhs )
inline

◆ operator+()

BigInt operator+ ( const BigInt & lhs,
const BigInt & rhs )
inline

◆ operator-()

BigInt operator- ( const BigInt & lhs,
const BigInt & rhs )
inline

◆ operator/()

BigInt operator/ ( const BigInt & lhs,
const BigInt & rhs )
inline

◆ operator<()

bool operator< ( const BigInt & lhs,
const BigInt & rhs )
inline

◆ operator<=()

bool operator<= ( const BigInt & lhs,
const BigInt & rhs )
inline

◆ operator==()

bool operator== ( const BigInt & lhs,
const BigInt & rhs )
inline

◆ operator>()

bool operator> ( const BigInt & lhs,
const BigInt & rhs )
inline

◆ operator>=()

bool operator>= ( const BigInt & lhs,
const BigInt & rhs )
inline