BigIntMultiplication

所属分类:Java编程
开发工具:Java
文件大小:1KB
下载次数:40
上传日期:2006-04-04 11:27:24
上 传 者iran1314
说明:  大整数乘法例子代码 /* 递归边界,如果是1位二进制数与1位二进制数相乘,则可以直接计算 */ /*累计做1位二进制乘法运算的次数*/ /* return (X*Y) */ /* 计算n的值 */ /* 把X和Y拆分开来,令X=A*2^(n/2)+B, 左移位运算,mod = 1<<(n/2) */ /* 计算XY=AC*2^n+(AD+CB)*2^(n/2)+BD */ /* 计算A*C,再向左移n位 */ /* 递归计算A*D */ /* 递归计算C*B */ /* 计算a21+a22,再向左移n/2位 */ /* 递归计算B*D */ /* XY=a1+a2+a3 */
(large integer multiplication example code/* Recursive border, if it is a binary number with a binary number multiplication, can be directly calculated*//* the beginning of a binary multiplication of the number*//* return (X* Y)*//* calculate the value of n*//* X and Y to split it so that X = A* 2 ^ (n/2) B, the left shift operator, mod = 1LT; lt; (n/2)*//* calculate XY = AC* 2 ^ n (AD CB)* 2 ^ (n/2) BD*//* A* C calculation, further n-bits*//* recursive computation A* D*//* recursive calculation of C* B*//* Calculation A21 A22 and then bits n/2*//* recursive calculation B* D*//* XY = a1 a2 a3* /)

文件列表:
BigIntMultiplication.java (3449, 2006-02-24)

近期下载者

相关文件


收藏者