马上注册,结交更多好友,享用更多功能,让你轻松玩转社区。
您需要 登录 才可以下载或查看,没有账号?欢迎注册
×
重大消息,近日,由我自己独创的对数log(x)算法终于定型。其复杂度与当前公开发表的最好的算法AGM同,都是O(log(P)M(P)),p为精度,其中M(P)代表两个P位整数相乘所需要的基本运算的次数。但是我的算法有很小的常数因子,故速度更快。测试报告显示,这个算法的性能是非常令人振奋的,在100-10000位精度下,可比现在最快软件Mathematica快2.8到8倍。计算一个正数的对数精确到1万位,仅需2.53毫秒。
下面给出性能数据测试平台:
处理器: Intel(R) Core(TM) i7-2600K CPU @3.40GH
操作系统: Windows7 32-bit
Maple 版本:17.0
Mathematica版本: 10.3.0 32-bit
Pari版本: 2.9.3
mpfr版本:3.1.6
位数 | 时间,单位为毫秒 | Maple | Mathematica | Pari | MPFR | BCMP_log1 | BCMP_log2 | 20 | 0.029941 | 0.00239015 | 0.003114 | 0.004833 | 0.008654 | 0.000762 | 30 | 0.040354 | 0.00298078 | 0.003744 | 0.005667 | 0.008218 | 0.000975 | 40 | 0.043768 | 0.00365648 | 0.004687 | 0.006456 | 0.010237 | 0.001043 | 50 | 0.045405 | 0.0043437 | 0.005267 | 0.006782 | 0.010515 | 0.001217 | 60 | 0.061336 | 0.00519375 | 0.007068 | 0.008939 | 0.012052 | 0.002432 | 70 | 0.063722 | 0.00653649 | 0.008129 | 0.009373 | 0.012467 | 0.002622 | 80 | 0.06523 | 0.00723503 | 0.008918 | 0.010451 | 0.014011 | 0.002847 | 90 | 0.067488 | 0.00835762 | 0.009401 | 0.010859 | 0.013989 | 0.002967 | 100 | 0.069835 | 0.00915581 | 0.011404 | 0.012145 | 0.017113 | 0.003194 | 125 | 0.072167 | 0.0118124 | 0.013434 | 0.014376 | 0.020085 | 0.003843 | 158 | 0.079578 | 0.0176895 | 0.020295 | 0.018568 | 0.026015 | 0.004825 | 199 | 0.084953 | 0.0243275 | 0.027464 | 0.023096 | 0.032686 | 0.005604 | 251 | 0.101058 | 0.0325844 | 0.039437 | 0.030076 | 0.041313 | 0.006338 | 316 | 0.111391 | 0.0483244 | 0.057234 | 0.03874 | 0.057398 | 0.008075 | 398 | 0.125592 | 0.0625776 | 0.090215 | 0.054713 | 0.076384 | 0.009971 | 501 | 0.140205 | 0.0837851 | 0.126219 | 0.076801 | 0.100851 | 0.012947 | 630 | 0.169863 | 0.137465 | 0.173471 | 0.1227 | 0.126775 | 0.025564 | 794 | 0.201257 | 0.202088 | 0.262401 | 0.192741 | 0.175562 | 0.022624 | 1000 | 0.26965 | 0.311744 | 0.378275 | 0.29729 | 0.260477 | 0.041692 | 1258 | 0.344599 | 0.42428 | 0.545905 | 0.425357 | 0.321757 | 0.056777 | 1584 | 0.437988 | 0.574393 | 0.836217 | 0.671066 | 0.504561 | 0.077545 | 1995 | 0.570668 | 0.814906 | 1.219222 | 1.042976 | 0.671209 | 0.133183 | 2511 | 0.807129 | 1.11878 | 1.723848 | 1.448282 | 0.983084 | 0.190615 | 3162 | 1.07266 | 1.57654 | 2.561828 | 2.257336 | 1.489376 | 0.273305 | 3981 | 1.47754 | 2.26133 | 3.66907 | 2.959093 | 2.155975 | 0.510987 | 5011 | 2.15234 | 3.06957 | 5.208427 | 3.788049 | 3.193957 | 0.727249 | 6309 | 2.96615 | 4.36979 | 7.723928 | 5.709551 | 4.507839 | 1.019573 | 7943 | 4.0625 | 6.25344 | 11.071721 | 7.894751 | 6.753858 | 1.748821 | 10000 | 6.33854 | 8.50294 | 15.950279 | 10.198301 | 9.649934 | 2.538205 | 17782 | 15.1146 | 19.8861 | 38.916218 | 23.862088 | 23.569465 | 6.929607 | 31622 | 42.25 | 52.1046 | 94.352581 | 68.980759 | 62.309453 | 18.861327 | 56234 | 681 | 117.861 | 207.879794 | 131.337302 | 146.628323 | 45.943156 | 100000 | 2012.67 | 261.338 | 587.256462 | 296.982964 | 364.771994 | 117.998387 |
性能对比折线图,以mpfr为基准,令mpfr的运行时间为1,值越小越好。
性能对比折线图2,去掉Maple的测试结果,仍以mpfr为基准,值越小越好。
|