加入收藏 | 设为首页 | 会员中心 | 我要投稿 李大同 (https://www.lidatong.com.cn/)- 科技、建站、经验、云计算、5G、大数据,站长网!
当前位置: 首页 > 大数据 > 正文

biginteger – 大数分部

发布时间:2020-12-14 04:20:38 所属栏目:大数据 来源:网络整理
导读:除了学校方法之外,还有更快的方法来划分大整数(1000位或更多)吗? 解决方法 维基百科列出 multiple division algorithms.见 Computational complexity of mathematical operations,其中 Schoolbook long division为O(n ^ 2),Newton’s method为M(n),其中M是
除了学校方法之外,还有更快的方法来划分大整数(1000位或更多)吗?

解决方法

维基百科列出 multiple division algorithms.见 Computational complexity of mathematical operations,其中 Schoolbook long division为O(n ^ 2),Newton’s method为M(n),其中M是所用乘法算法的复杂度,可以与O一样好(n log n 2 ^( log*n)渐渐地.

从one of the multiplication algorithms的讨论中注意到,渐近的最佳算法不一定是“小”输入的最快算法:

In practice the Sch?nhage–Strassen algorithm starts to outperform older methods such as Karatsuba and Toom–Cook multiplication for numbers beyond 2^(2^15) to 2^(2^17) (10,000 to 40,000 decimal digits). The GNU Multi-Precision Library uses it for values of at least 1728 to 7808 64-bit words (111,000 to 500,000 decimal digits),depending on architecture. There is a Java implementation of Sch?nhage–Strassen which uses it above 74,000 decimal digits.

(编辑:李大同)

【声明】本站内容均来自网络,其相关言论仅代表作者个人观点,不代表本站立场。若无意侵犯到您的权利,请及时与联系站长删除相关内容!

    推荐文章
      热点阅读