Does the standard library have a BigInt
class? (numbers with many digits held in a container)
Is there a BigInt large number class in the standard library?
10k views Asked by XCS At
3
There are 3 answers
0
On
Unfortunately, the C++ standard library does not natively support arbitrarily long integers. However, these libraries can help you getting the job done:
- The GNU Multiple Precision Arithmetic Library (has both C and C++ interfaces, also refered as GMP)
- InfInt
- C++ BigInt class
- Boost.Multiprecision
- Multiple Precision Integers and Rationals (written in assembly, has a C interface)
- BigDigits multiple-precision arithmetic (in C)
- BigIntegerCPP (only supports addition and multiplication)
- C++ Big Integer Library (no longer maintained)
The C++ standard library (sometimes erroneously referred to as "STL") does not contain any extended precision support.