摘要
为了验证Euclid算法和Stein算法在高精度条件下的真实运行效率,以随机生成的多组高精度正整数,并分别按同位、异位、完全随机、斐波那契数列相邻项4种情况对这两种最大公约数算法的平均执行效率进行比较。实验发现:四种情况下的平均执行耗时Euclid算法均低于Stein算法;随着参数精度越高,Euclid算法的平均耗时越优于Stein算法;在随机高精度参数条件下,Stein算法比Euclid算法平均执行时间多约26.24%。
To verify the real efficiency of Euclid algorithm and Steinalgorithm under high precision condition.We compared the average operation efficiency of these two greatest common divisor algorithms and analyzed their trends by generating multiple groups of highly accurate positive integers at random and then computed their greatest common divisor in four cases of the same digital numbers,different digital numbers,wholly random digits and contiguous items of Fibonacci sequence as parameters. After the comparison of these two average time consuming experiments under four cases respectively,we found that average time-consuming of Euclid algorithm is lower than the Stein algorithm. Moreover,the higher the parameter precision is,the better the time consuming of Euclid algorithm which is better than that of Stein algorithm,and the time-consuming of Stein algorithm is about 26.24% more than Euclid algorithm is obtained under random high precision parameter condition.
作者
王一帆
沈阳
杨涛
WANG Yi-fan;SHEN Yang;YANG Tao(College of Information Technology,Nanjing University of Chinese Medicine,Nanjing 210023,China)
出处
《电子设计工程》
2018年第12期26-30,共5页
Electronic Design Engineering
基金
国家自然科学基金(81503499
81674099)
江苏省"青蓝工程"资助项目(2016)
江苏省高校自然科学基金(15KJB360006)
江苏省第一批省级科技计划(省重点研发计划)项目(BC2015022)
南京中医药大学护理学优势学科二期项目指令性课题(YSHL2016-043)