Expand description
Number theory: modular arithmetic, primes, factorisation, the Chinese remainder theorem, polynomials and decimal-string integers.
See the book entry Number theory.
Modules§
- base_
exponent_ in_ modulus - Modular exponentiation by square-and-multiply.
- chinese_
remainder_ theorem - The Chinese remainder theorem.
- greatest_
common_ divisor - Greatest common divisors and Bézout coefficients by Euclid’s algorithm.
- integer_
factorization - Factorization of 64-bit integers.
- integer_
square_ root - Exact integer square roots by Newton’s method and by bisection.
- multiplicative_
inverse_ modulo - Modular multiplicative inverses.
- polynomial
- Polynomial evaluation, construction from roots, and roots by companion-matrix eigenvalues.
- primality
- Deterministic primality testing for 64-bit integers.
- prime_
sieves - Prime sieves.
- text_
coded_ integer - Integers of any size stored as decimal digit strings, with schoolbook arithmetic.