Saturday, May 9, 2009

Why isn't there a biginteger class in C++ standard libraries?

I know there are many third party extentions that allow big integer like in Java, but why isn't in the the standard libraries?

Why isn't there a biginteger class in C++ standard libraries?
If you don't count the STL as part of the core language, C++ libraries are pretty sparse. Many things are not included, BigInt support being the least of them. The core C++ language, like C is very thin.
Reply:The C++ standard libraries (C/C++ in general, really) are intended for fairly low-level application design.





Nothing prevents the implementation of an arbitrary length integer class, but the standard types of 64-bit ints (long long) and double precision floats (double) are sufficient for the vast majority of apps while still remaining very close to the hardware.


No comments:

Post a Comment