Module math

Module math 

Source
Expand description

Number-theoretic algorithms.

Functionsยง

crt
Performs CRT (Chinese Remainder Theorem).
floor_sum
Returns
inv_mod
Returns an integer $y \in [0, m)$ such that $xy \equiv 1 \pmod m$.
pow_mod
Returns $x^n \bmod m$.