文件名称:HugeInt_C++
- 所属分类:
- 数据结构常用算法
- 资源属性:
- [Windows] [Visual C] [源码]
- 上传时间:
- 2012-11-26
- 文件大小:
- 1.77mb
- 下载次数:
- 0次
- 提 供 者:
- 杨*
- 相关连接:
- 无
- 下载说明:
- 别用迅雷下载,失败请重下,重下不扣分!
介绍说明--下载内容均来自于网络,请自行研究使用
将大数看作一个n进制数组,对于目前的32位系统而言n可以取值为2的32次方,即0x10000000,
假如将一个1024位的大数转化成0x10000000进制,它就变成了32位,而每一位的取值范围就不是0-1
或0-9,而是0-0xffffffff。我们正好可以用一个无符号长整数来表示这一数值。所以1024位的大数
就是一个有32个元素的unsigned long数组。而且0x100000000进制的数组排列与2进制流对于计算机
来说,实际上是一回事,但是我们完全可以针对unsigned long数组进行“竖式计算”,而循环规模
被降低到了32次之内,并且算法很容易理解。-Will be large numbers as a n-band array, on the current 32-bit systems can n value of 2 32-th power, that is 0x10000000, if a 1024 large numbers into hexadecimal 0x10000000, it changed became 32, and each range is not 0-1 or 0-9, but 0-0xffffffff. We just can use a unsigned long integer to express this value. Therefore, large numbers of 1024 is a 32 element array of unsigned long. 0x100000000 hex array and array with 2-band flow for the computer, the fact is one thing, but we can be an array of unsigned long for a vertical calculation , and circle size was reduced to 32 times, the algorithm and it is easy to understand.
假如将一个1024位的大数转化成0x10000000进制,它就变成了32位,而每一位的取值范围就不是0-1
或0-9,而是0-0xffffffff。我们正好可以用一个无符号长整数来表示这一数值。所以1024位的大数
就是一个有32个元素的unsigned long数组。而且0x100000000进制的数组排列与2进制流对于计算机
来说,实际上是一回事,但是我们完全可以针对unsigned long数组进行“竖式计算”,而循环规模
被降低到了32次之内,并且算法很容易理解。-Will be large numbers as a n-band array, on the current 32-bit systems can n value of 2 32-th power, that is 0x10000000, if a 1024 large numbers into hexadecimal 0x10000000, it changed became 32, and each range is not 0-1 or 0-9, but 0-0xffffffff. We just can use a unsigned long integer to express this value. Therefore, large numbers of 1024 is a 32 element array of unsigned long. 0x100000000 hex array and array with 2-band flow for the computer, the fact is one thing, but we can be an array of unsigned long for a vertical calculation , and circle size was reduced to 32 times, the algorithm and it is easy to understand.
(系统自动生成,下载前可以参看下载内容)
下载文件列表
HugeInt_C++
...........\Debug
...........\HugeInt.cpp
...........\HugeInt.dsp
...........\HugeInt.dsw
...........\HugeInt.h
...........\HugeInt.ncb
...........\HugeInt.opt
...........\HugeInt.plg
...........\stdafx.cpp
...........\stdafx.h
...........\Debug
...........\HugeInt.cpp
...........\HugeInt.dsp
...........\HugeInt.dsw
...........\HugeInt.h
...........\HugeInt.ncb
...........\HugeInt.opt
...........\HugeInt.plg
...........\stdafx.cpp
...........\stdafx.h