基于c++三维数组实现大整数相乘的算法  被引量:1

Algorithm Based on c++ Three-Dimensional Array to Achieve Large Integer Multiplication

在线阅读下载全文

作  者:龚雪慧[1] 王成杰[1] 

机构地区:[1]常州纺织服装职业技术学院,江苏常州213164

出  处:《电脑与信息技术》2016年第4期16-18,共3页Computer and Information Technology

摘  要:在程序设计中,每种数据类型有数值范围限制,若两个位数较长的大数值整数相乘,积容易溢出,一般处理对策是将整数乘法转换成浮点乘法以提高计算精度,拓宽数值计算的范围。文章分析了印度数学家婆什伽罗名著《丽罗娃提》中的格子乘法规则,借用三维数组替代格子乘法中斜线宫格,将两个大整数每个位数进行交叉相乘,利用程序设计的循环结构将斜线宫格中的同位数值进行相加、依次进位,完成了大整数乘法算法研究,并给出了c++语言的实现代码。In program design, each type of data in a numerical range limit, if two digits longer numerical large integer multiplication, the product is easy to overflow, the general processing strategy is will integer multiplication is converted into floating point multiplication in order to improve the calculafon precision, and to broaden the scope of numerical calculation. Based on the analysis of the Indian mathematician Bhaskara classics the Lirova provided in lattice multiplication rule, use the three dimensional array of alternatives multiplication grid diagonal grids, each two big integer number were cross multiplication, will slash grids in the same bit values are added together, in order to carry, the completion of the large integer multiplication algorithm using loop structure of the program design, and gives the C + + language implementation code.

关 键 词:数据类型 格子乘法 三维数组 位相乘 

分 类 号:TP301.6[自动化与计算机技术—计算机系统结构]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

相关的主题
相关的作者对象
相关的机构对象