Big Integer Cpp Template library

Bigintctl is a Big Integer C++ Template Library that provides fixed length signed integers.

The template argument is the length, and is given in the number of bits. The length can be any number from 1 and up.

The library is very easy to use, and the big integer requires only inclusion of the header file "bigint.h" in order to be used.

Bigintctl is written is C++98, so C++11 is not required.

The package includes test and example applications which builds on Linux and Windows.

This is a complete example program:

#include "bigint.h"
int main()
BigInt<1024> a("1A2323897429347234234234234");
BigInt<1024> b("C45684848848F89809089080888");

std::cout << a << " * " << b << " = " << a * b << std::endl;

return 0;

In the example, 1024 bit integers are used.

The program can be built by putting the code in a file "helloworld.cpp", and the compiled with the command:
g++ helloworld.cpp

The output will be:
1A2323897429347234234234234 * C45684848848F89809089080888 = 140BBC8AD377E2E8C7275DFF5CC8EE9C4F67086DA08994B26CCBA0

Bigintctl prefers hexadecimal reprsentation of numbers, and if no other information is given, the default is to use hexadecimal notation.


bigintctl_0.7.tar.gz Latest release


Web address: