最好的(便携式)跨平台任意精度数学库是什么?

发布于 2024-08-27 17:00:59 字数 1539 浏览 5 评论 0原文

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(5

财迷小姐 2024-09-03 17:00:59

GMP 是流行的选择。 Squeak Smalltalk 有一个非常好的库,但它是用 Smalltalk 编写的。

您询问了相关书籍或文章。 Bignum 的棘手部分是长除法。我推荐 Per Brinch Hansen 的论文 Multiple-Length Division Revisited: A Tour of the Minefield

GMP is the popular choice. Squeak Smalltalk has a very nice library, but it's written in Smalltalk.

You asked for relevant books or articles. The tricky part of bignums is long division. I recommend Per Brinch Hansen's paper Multiple-Length Division Revisited: A Tour of the Minefield.

淡忘如思 2024-09-03 17:00:59

总的来说,最快的通用任意精度库是 GMP。如果您想使用浮点值,请查看 MPFR 库。 MPFR 基于 GMP。

关于其他语言的原生任意精度支持,由于许可证、代码大小和代码可移植性原因,Python 使用自己的实现。 GMPY 模块允许 Python 访问 GMP 库。

Overall, he fastest general purpose arbitrary precision library is GMP. If you want to work with floating point values, look at the the MPFR library. MPFR is based on GMP.

Regarding native arbitrary precision support in other languages, Python uses its own implementation because of license, code size, and code portability reasons. The GMPY module lets Python access the GMP library.

绝不放开 2024-09-03 17:00:59

请参阅 TTMath,这是一个小型模板化标头库,免费供个人和商业使用。

See TTMath, a small templated header-only library free for personal and commercial use.

梦年海沫深 2024-09-03 17:00:59

我自己没有比较过任意精度算术库,但比较过的人似乎或多或少都一致选择了 GMP。就其价值而言,GHC Haskell 和 GNU Guile Scheme 中的任意精度整数都是使用 GMP 实现的,并且是 pidigits 语言大战基准 基于 GMP。

I've not compared arbitrary precision arithmetic libraries to each other myself, but people who do seem to have more or less uniformly settled on GMP. For what it's worth, the arbitrary precision integers in GHC Haskell and GNU Guile Scheme are both implemented using GMP, and the fastest implementation of the pidigits benchmark on the language shootout is based on GMP.

混浊又暗下来 2024-09-03 17:00:59

Pari 怎么样?它建立在顶级 GMP 之上,并提供您需要的有关数论运算的所有其他好处(以及许多符号计算内容)。

What about Pari? It’s built on top GMP and provides all the other goodies about number theory operations you’ll ever need (and many symbolic computation stuff).

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文