基于C ++的大整数类型的设计与实现  被引量:2

Design and Implementation of Big Integer Types Based on C ++

在线阅读下载全文

作  者:鄢涛[1,2] 余悦[1,2] 于曦[1,2] 

机构地区:[1]成都大学模式识别与智能信息处理四川省高校重点实验室,四川成都610106 [2]成都大学信息科学与工程学院,四川成都610106

出  处:《成都大学学报(自然科学版)》2016年第3期252-255,270,共5页Journal of Chengdu University(Natural Science Edition)

摘  要:针对C++标准库不支持大整数类型的问题,设计并实现一个大整数类型,该类型提供了包括四则运算、运算符重载在内的一整套用于大整数运算的算法,并进一步封装成了类库提供对外调用接口,使得大数类的对象拥有和基本数据类型变量一样的行为.此外,该大数类对象还拥有自动管理内存的功能,从理论上讲,只要内存足够,可以对任意长度的整数进行运算.该大数类简单易用,在编程算法、极限运算等方面有一定的应用意义.C ++ Standard Library is unavailable for big integer,and therefore, this paper designs and also achieves a big integer data type, which provides a suit of algorithms including arithmetic calculations and operation overload. Furthermore, the algorithms are encapsulated as a library which provides calling inter- faces for exterior,and makes the objects of the big integer function in the same way as the basic data type variables. In addition, obejcts based on big integer can also manage memory automatically. Theoretically, they can deal with any size of integer as long as the memory is large enough. The practice shows that this big integer library is simple and convenient, and has significant application meaning in programming, ex- treme computing, etc.

关 键 词:C++ 大整数 类库 自动内存管理 

分 类 号:TP312[自动化与计算机技术—计算机软件与理论]

 

参考文献:

正在载入数据...

 

二级参考文献:

正在载入数据...

 

耦合文献:

正在载入数据...

 

引证文献:

正在载入数据...

 

二级引证文献:

正在载入数据...

 

同被引文献:

正在载入数据...

 

相关期刊文献:

正在载入数据...

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