40 std::string s(
"3141592653589793238462643383279");
47 std::cout << f << std::endl;
56 std::cout << (g + h) <<
'\n'
60 << (g % h) << std::endl;
65 std::cout.flags(std::ios::hex | std::ios::showbase);
66 std::cout << (i & j) <<
'\n'
72 std::cout.flags(std::ios::dec);
77 for (
int power = 0; power <= maxPower; power++) {
78 std::cout <<
"314^" << power <<
" = " << x << std::endl;
88 }
catch(
char const* err) {
89 std::cout <<
"The library threw an exception:\n"
BigInteger stringToBigInteger(const std::string &s)
std::string bigIntegerToString(const BigInteger &x)
BigUnsigned modinv(const BigInteger &x, const BigUnsigned &n)
BigUnsigned gcd(BigUnsigned a, BigUnsigned b)
BigUnsigned modexp(const BigInteger &base, const BigUnsigned &exponent, const BigUnsigned &modulus)