基于类的大整数乘法运算的实现  被引量:3

Implementation of multiplication of large integers based on class

在线阅读下载全文

作  者:杜青[1] 

机构地区:[1]南京工程学院计算机工程学院

出  处:《微型机与应用》2017年第2期8-9,13,共3页Microcomputer & Its Applications

摘  要:本文以C++语言设计了大整数类,在类中以数组存储大整数,同时借鉴分治算法思想实现了大整数的乘法运算。算法中将被乘数与乘数按照相同位数进行分组,通过对每组较小数值整数进行乘法和加法运算而得到大整数相乘的积。该程序在VC++2015开发平台调试通过。测试结果表明,当每个分组数据位数多时,运算速度显著提高。To implement multiplication of large integers,this paper introduces large integers class with the C ++ programming language and utilizes array to store large integers. Based on divide and conquer algorithm,the proposed method divides multiplicand and multiplier into groups with same size. Based on divide and conquer algorithm,it gets the product of the large integers multiplication by transferring the direct multiplication into modular operation on individual groups with smaller numerical value. The program is implemented successfully on VC ++ 2015.The test results show that the operation speed for integers in large number increases a lot.

关 键 词:大整数 大整数相乘 分治算法  

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

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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