ESBMC
Efficient SMT-based Context-Bounded Model Checker
Loading...
Searching...
No Matches
mp_arith.cpp File Reference
#include <cassert>
#include <cctype>
#include <cstdlib>
#include <limits>
#include <sstream>
#include <util/arith/arith_tools.h>
#include <util/arith/mp_arith.h>
Include dependency graph for mp_arith.cpp:

Functions

BigInt operator>> (const BigInt &a, const BigInt &b)
BigInt operator<< (const BigInt &a, const BigInt &b)
std::ostream & operator<< (std::ostream &out, const BigInt &n)
const BigInt string2integer (const std::string &n, unsigned base)
const std::string integer2binary (const BigInt &n, std::size_t width)
const std::string integer2string (const BigInt &n, unsigned base)
const BigInt binary2integer (const std::string &n, bool is_signed)
 convert binary string representation to BigInt

Function Documentation

◆ binary2integer()

const BigInt binary2integer ( const std::string & n,
bool is_signed )

convert binary string representation to BigInt

parameters: string of '0'/'1', most significant bit first
Returns
BigInt

◆ integer2binary()

const std::string integer2binary ( const BigInt & n,
std::size_t width )
Returns
string of '0'/'1', most significant bit first

◆ integer2string()

const std::string integer2string ( const BigInt & n,
unsigned base )

◆ operator<<() [1/2]

BigInt operator<< ( const BigInt & a,
const BigInt & b )

◆ operator<<() [2/2]

std::ostream & operator<< ( std::ostream & out,
const BigInt & n )

◆ operator>>()

BigInt operator>> ( const BigInt & a,
const BigInt & b )

◆ string2integer()

const BigInt string2integer ( const std::string & n,
unsigned base )
parameters: string of '0'-'9' etc. most significant digit first
base of number representation
Returns
BigInt