Skip to content
UPEEC

Modular Arithmetic

Arithmetic with remainders: $(a+b)\bmod m$, $(a\cdot b)\bmod m$, and modular inverses.

Intermediate
Comments 0

Answers "mod 109+710^9+7" keep numbers small. Inverse of aa mod prime pp is ap−2 mod pa^{p-2} \bmod p (Fermat).

Spotted a mistake or want to add detail? Suggest an improvement — Content Contributors' edits are reviewed by editors before they go live.

Discussion (0)

Sign in or join free to ask questions and discuss this topic.