Big Integer Library in C++
Using the library
A. Put : #include "bigint.h" at the top of your file and the bigint.h file should be in the same directory .
B. These functions are supported by the bigInteger Library:
All the functions returns a single string which is the result . Except the division function which returns pair<string,string> the first element being the quotient and the second being the remainder.
- Addition : add(string a, string b)
- Subtraction : sub(string a, string b)
- Multiplication : mul(string a, string b)
- Division : div(string a, string b)
- Exponentiation : fast_pow(string base,string exp)
- HCF/GCD of two numbers : hcf(string a, string b)
- Factorial of a number : fact(string a)