Big Integer library for c++. Implements basic operations which are described below.
- source code must use namespace
std
andstring
header. - Every funtion returns the value in the form of string.
Adds two big integers.
string addition(string, string)
Substracts second paramter from first.
string subtraction(string, string)
Multiplies two big integers
string multiply(string, string)
Divides two big integers. First parameter is dividend and the second is divisor.
string divide(string, string)
Calculates factorial of given integer. Parameter passes must not overflow int.
string factorial(int)
Calculates GCD of two big integers.
string gcd(string, string)
Does expoenentiation on given big integer. First parameter is base and the second is expoent value. Exponent value must not overflow long long.
string fast_expo(string, long long)
Converts given binary string into its decimal value.
string to_decimal(string)
Converts given decimal integer string into binary.
string to_binary(string)
Returns true
if first parameter is greater than second otherwise false.
bool comp(string, string)
Returns true
if first parameter is greater than second otherwise false.
bool bin_comp(string, string)