2 * Matt McCutchen's Big Integer Library
3 * http://mysite.verizon.net/mccutchen/bigint/
6 #ifndef BIGINTEGERUTILS
7 #define BIGINTEGERUTILS
9 #include "BigInteger.hh"
15 * (1) `std::string <=> BigUnsigned/BigInteger' conversion routines easier than `BigUnsignedInABase'
16 * (2) << and >> operators for BigUnsigned/BigInteger, std::istream/std::ostream
19 // Conversion routines. Base 10 only.
20 std::string easyBUtoString(const BigUnsigned &x);
21 std::string easyBItoString(const BigInteger &x);
22 BigUnsigned easyStringToBU(const std::string &s);
23 BigInteger easyStringToBI(const std::string &s);
25 // Outputs x to os, obeying the flags `dec', `hex', `bin', and `showbase'.
26 std::ostream &operator <<(std::ostream &os, const BigUnsigned &x);
28 // Outputs x to os, obeying the flags `dec', `hex', `bin', and `showbase'.
29 // My somewhat arbitrary policy: a negative sign comes before a base indicator (like -0xFF).
30 std::ostream &operator <<(std::ostream &os, const BigInteger &x);