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

Go to the source code of this file.

Functions

std::ostream & operator<< (std::ostream &, const BigInt &)
BigInt operator>> (const BigInt &, const BigInt &)
BigInt operator<< (const BigInt &, const BigInt &)
const std::string integer2string (const BigInt &, unsigned base=10)
const BigInt string2integer (const std::string &, unsigned base=10)
const std::string integer2binary (const BigInt &, std::size_t width)
const BigInt binary2integer (const std::string &, 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 = 10 )

◆ 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