C / C ++ Extended Precision Floating Point Library

I am looking for an extended precision floating point library with the following functions:

  • fixed data size (i.e., the extended precision float accepts a fixed amount of memory).
  • no initialization required for variables
  • indicate the size of both the mantissa and the exhibitor
  • C / C ++ Interface
  • support for really large floats> 10 ^ 10,000

The closest I found was the HPA library from Ivano Primi. The only problem with this library is that I cannot expand the exponent (it is fixed with 15 bits). This allows me to choose options for the mantissa, but the largest representable number is always limited to 10 ^ 4932. Other libraries, such as GMP, require initialization and do not allow data types of fixed size. The fact is that I do not need arbitrary accuracy, but simply expanded. But I need to have very large exhibitors.

Thanks for your help!

Mark

+6
source share
1 answer

Ttmath seems to be very close to what I'm looking for. It allows you to specify large floats with exponents and mantissa and does not require initialization.

+1
source

Source: https://habr.com/ru/post/913213/


All Articles