Extended Precision Floating Point Library C/C++(扩展精度浮点库 C/C++)
问题描述
我正在寻找具有以下功能的扩展精度浮点库:
I am looking for an extended precision floating point library with the following features:
- 固定数据类型大小(即扩展精度浮点数占用固定内存量)
- 变量无需初始化
- 指定尾数和指数的大小
- C/C++ 接口
- 支持非常大的浮点数 > 10^10000
我能找到的最接近的是 Ivano Primi 的 HPA 库.这个库的唯一问题是我无法扩展指数(它用 15 位固定).它允许我对尾数进行多种选择,但最大的可表示数字始终限于 10^4932.GMP 等其他库需要初始化,并且不允许固定大小的数据类型.关键是我不需要任意精度,而只是扩展.但我需要有非常大的指数.
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.
这篇关于扩展精度浮点库 C/C++的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持编程学习网!
本文标题为:扩展精度浮点库 C/C++


基础教程推荐
- 在 C++ 中计算滚动/移动平均值 2021-01-01
- C++结构和函数声明。为什么它不能编译? 2022-11-07
- 常量变量在标题中不起作用 2021-01-01
- 如何通过C程序打开命令提示符Cmd 2022-12-09
- 静态库、静态链接动态库和动态链接动态库的 .lib 文件里面是什么? 2021-01-01
- 如何检查GTK+3.0中的小部件类型? 2022-11-30
- 这个宏可以转换成函数吗? 2022-01-01
- 如何在 C++ 中初始化静态常量成员? 2022-01-01
- 如何将 std::pair 的排序 std::list 转换为 std::map 2022-01-01
- 我有静态或动态 boost 库吗? 2021-01-01