CodeBus
www.codebus.net
Search
Sign in
Sign up
Hot Search :
Source
embeded
web
remote control
p2p
game
More...
Location :
Home
Search - BigIntMultiplication
Main Category
SourceCode
Documents
Books
WEB Code
Develop Tools
Other resource
Search - BigIntMultiplication - List
[
JSP/Java
]
BigIntMultiplication
DL : 0
大整数乘法例子代码 /* 递归边界,如果是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 * /
Date
: 2008-10-13
Size
: 1.5kb
User
:
小城
[
JSP/Java
]
BigIntMultiplication
DL : 0
大整数乘法例子代码 /* 递归边界,如果是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* /
Date
: 2025-07-11
Size
: 1kb
User
:
小城
[
Algorithm
]
BigIntMultiplication
DL : 0
使用分治技术,实现的两个大整数的乘法运算-The use of sub-rule technology, the realization of two big integer multiplication
Date
: 2025-07-11
Size
: 795kb
User
:
wangkc
CodeBus
is one of the largest source code repositories on the Internet!
Contact us :
1999-2046
CodeBus
All Rights Reserved.