标题:各位老师好!求助编辑一个大整数的快速乘除法可调用程序
只看楼主
xianfajushi
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:8
帖 子:527
专家分:690
注 册:2007-9-8
得分:0 
    大整数8位乘法("147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369147852369","36985214");
9*44=396位乘8位,包含显示用时,这样的速度可比傅利叶快速变换大数乘法?



[此贴子已经被作者于2020-2-26 13:06编辑过]

2020-02-26 12:58
ysr2857
Rank: 6Rank: 6
等 级:贵宾
威 望:28
帖 子:767
专家分:65
注 册:2020-2-10
得分:0 
回复 141楼 xianfajushi
谢谢!是不慢,原理是啥?是vb版程序吗?希望指点一下!
2020-02-26 13:11
xianfajushi
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:8
帖 子:527
专家分:690
注 册:2007-9-8
得分:0 
刚设计出来的,新鲜出炉,看我博客,C++的,尚未转写VB,看得懂就自己去转写.
先用其他的程序验证一下答案是否正确,还要优化.
2020-02-26 13:15
xianfajushi
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:8
帖 子:527
专家分:690
注 册:2007-9-8
得分:0 
原理就是我发的构思
以下是引用xianfajushi在2020-2-25 12:53:21的发言:
1假设说INT类型求300位数,分段求是否可实现?
2如300个9乘以一个9=多少,应该是一个8后面298个9最后一个1,对?
3用分段乘法与加法会不会比弄成数组更快?
4如300个9乘以2个9=多少?

2020-02-26 13:23
xianfajushi
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:8
帖 子:527
专家分:690
注 册:2007-9-8
得分:0 
    大整数8位乘法("999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999","9");
2020-02-26 13:34
xianfajushi
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:8
帖 子:527
专家分:690
注 册:2007-9-8
得分:0 
    大整数8位乘法("99999999","99999999");
2020-02-26 13:49
xianfajushi
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:8
帖 子:527
专家分:690
注 册:2007-9-8
得分:0 
    大整数8位乘法("99999999999999","99999999");出错了丢失了1前面的0了.需要设法解决,理论和实践我的构思是可行的,也是计算正确的,有点小意外要处理,不是计算错误.
更新博客,后续程序还要优化,暂时解决了丢失0的问题,这个博客更新有点问题,排版格式不对,只好删除了先前的博客,重新发布.


[此贴子已经被作者于2020-2-26 15:12编辑过]

2020-02-26 14:32
ysr2857
Rank: 6Rank: 6
等 级:贵宾
威 望:28
帖 子:767
专家分:65
注 册:2020-2-10
得分:0 
谢谢!我看不懂vc,小的数据看不出是否速度提高了,我的程序也是达到10^(-2)~10^(-3)之间,数量级不变,只有计算更大的数才能分辨!非常感谢!
2020-02-26 15:25
xianfajushi
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:8
帖 子:527
专家分:690
注 册:2007-9-8
得分:0 
那给个例子来运行试看.
2020-02-26 15:31
xianfajushi
Rank: 7Rank: 7Rank: 7
等 级:黑侠
威 望:8
帖 子:527
专家分:690
注 册:2007-9-8
得分:0 
4千位*8位
    大整数8位乘法("9999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999","99999999");


[此贴子已经被作者于2020-2-26 15:46编辑过]

2020-02-26 15:45



参与讨论请移步原网站贴子:https://bbs.bccn.net/thread-499181-1-1.html




关于我们 | 广告合作 | 编程中国 | 清除Cookies | TOP | 手机版

编程中国 版权所有,并保留所有权利。
Powered by Discuz, Processed in 0.242163 second(s), 8 queries.
Copyright©2004-2024, BCCN.NET, All Rights Reserved