This is a C++ implementation of BigInteger
to compile:
$ make
to run:
$ ./main
default - BigInteger a; // a = 0 by default
int - BigInteger a(123), b = -123;
string - BigInteger a("999999999999999999999");
BigInteger a("foobar"); // throws exception : Invalid value: foobar
BigInteger b("123123s"); // Invalid value: 123123s
BigInteger a = 123;
a--;
--a;
a++;
++a;
>
<
==
!=
<=
>=
BigInteger a = 123;
a = -a; // a = -123
+ // addition
- // subtraction
/ // division
* // multiplication
% // module
>> // input
<< // output
+= // addition assigment
-= // subtraction assignment
abs() // absolute value