扩展precision浮点库C / C ++ [英] Extended Precision Floating Point Library C/C++
问题描述
我要寻找一个扩展precision浮点库,具有以下特点:
I am looking for an extended precision floating point library with the following features:
- 固定的数据类型的大小(即扩展precision浮法需要固定的内存量)
- 不变量所需的初始化
- 指定两个尾数和指数 的大小
- C / C ++接口
- 对于真正的大花车支持> 10 ^ 10000
我能找到的最接近的是HPA库由伊万诺普米族。与此库的唯一的问题是,我不能延伸指数(它是固定的15位)。它让我各种选择的尾数,但最大的再presentable数量始终限制在10 ^ 4932。像的GMP其它库需要初始化和不允许固定大小的数据类型。问题的关键是,我不需要任意precision,而只是延长。但我需要有非常大的指数。
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.
感谢您的帮助!
标记
推荐答案
似乎 ttmath 是非常接近我找。它允许指定用指数和尾数价值大花车,它不需要初始化。
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.
这篇关于扩展precision浮点库C / C ++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!