We don’t allow questions seeking recommendations for software libraries, tutorials, tools, books, or other off-site resources. You can edit the question so it can be answered with facts and citations.
Closed 9 years ago.
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
接受
或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
发布评论
评论(5)
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.
总的来说,最快的通用任意精度库是 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.
请参阅 TTMath,这是一个小型模板化标头库,免费供个人和商业使用。
See TTMath, a small templated header-only library free for personal and commercial use.
我自己没有比较过任意精度算术库,但比较过的人似乎或多或少都一致选择了 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.
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).