计算机工程与科学2013,Vol.35Issue(3):183-190,8.DOI:10.3969/j.issn.1007-130X.2013.03.032
大整数乘法运算的实现及优化
Implementation and optimization of multiplication of large integers
摘要
Abstract
According to the process and characteristics of written calculation methods for multiplication of large integers, we determine a data structure suitable for large integers, and optimize the design of memory allocation strategy of data structures, thus greatly improving the operating efficiency of the underlying data. By analyzing the written calculation methods for multiplication of large integers with two different schemes (radix 10x and radix 2x), we determine the maximum value of the radix under the two schemes. On the basis of in-depth study of data structure and radix of large integers, we give the C + + definition of large integers. Based on ideas of the Comba algorithm, we propose a new multiplication of large integers——Comba+ algorithm, which is easy to implement in high-level language. The algorithm is implemented in C++ and has a broader scope of applications. Simulation shows that the algorithm can significantly improve the processing speed. Through comparative analysis on various implementations of multiplication of large integers, we determine the best implementation.关键词
大整数/大整数乘法/数据结构/基/Comba算法Key words
large integers/multiplication of large integers/data structure/radix/Comba algorithm分类
信息技术与安全科学引用本文复制引用
杨灿,桑波..大整数乘法运算的实现及优化[J].计算机工程与科学,2013,35(3):183-190,8.基金项目
国家自然科学基金资助项目(61070090) (61070090)
广东省教育部产学研结合资助项目(2009B090300267) (2009B090300267)