问题
I am looking for an extended precision floating point library with the following features:
- fixed data type size (i.e. the extended precision float takes a fixed amount of memory)
- no initialization required for variables
- specify size of both mantissa and exponent
- C/C++ interface
- support for really large floats > 10^10000
The closest I could found is the HPA library by Ivano Primi. The only problem with this library is that I cannot extend the exponent (it is fixed with 15 bits). It allows me various choices for the mantissa, but the largest representable number is always limited to 10^4932. Other libraries like GMP require an initialization and do not allow for fixed size data types. The point is that I do not need arbitrary precision, but just extended. But I need to have very large exponents.
Thanks for your help!
Mark
回答1:
It seems that ttmath is very close to what I look for. It allows to specify big floats with exponent and mantissa value and it does not require initialization.
来源:https://stackoverflow.com/questions/10156002/extended-precision-floating-point-library-c-c