package
Version:
v0.0.5
Opens a new window with list of versions in this module.
Published: Nov 8, 2024
License: MIT
Opens a new window with license information.
Imports: 2
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
¶
-
func BigGcd(a, b *big.Int) *big.Int
-
func BinPow(base, exponent uint64) uint64
-
func CRT(k int, a, r []int) int64
-
func ExGcd(a, b int64) (gcd, x1, y1 int64)
-
func ExGcdBig(a, b *big.Int) (gcd, x, y *big.Int)
-
func ExGcdR(a, b int64) (int64, int64, int64)
-
func Gcd(a, b int64) int64
-
func ModInverse(a, m int64) (int64, error)
-
func SteinGcd(a, b *big.Int) *big.Int
BigGcd
Euclid algorithm
calculates the greatest common divisor of two big integers.
欧几里得算法
计算两个大整数的最大公约数
ExGcdBig 扩展欧几里得算法 Big Int 版本
Gcd
Euclid algorithm
欧几里得算法
SteinGcd
calculates the greatest common divisor of two big integers using the Stein algorithm.
使用 Stein 算法计算最大公约数
Source Files
¶
Click to show internal directories.
Click to hide internal directories.