Module algorithms
Expand description
⚠️ Collection of bignum algorithms.
Warning. Most functions in this module are currently not considered part of the stable API and may be changed or removed in future minor releases.
Modules§
- ⚠️ Collection of division algorithms.
Structs§
- ⚠️ Lehmer update matrix
Functions§
lhs += rhs + carry
- Computes
lhs += a
and returns the carry. - ⚠️ Computes
result += a * b
and checks for overflow. - Computes wrapping
lhs += a * b
when all arguments are the same length. - Computes
lhs += a * b
and returns the carry. - Compare two
u64
slices in reverse order. - ⚠️ Division with remainder.
- ⚠️ Lehmer’s GCD algorithms.
- ⚠️ Lehmer’s extended GCD.
- ⚠️ Modular inversion using extended GCD.
- Computes
lhs *= a
and returns the carry. - Computes a * b * 2^(-BITS) mod modulus
lhs -= rhs - borrow
- Computes a^2 * 2^(-BITS) mod modulus
- Computes
lhs -= a * b
and returns the borrow.