Community Article

Modular Arithmetic for the Working Programmer

Modulo without the math-class baggage: the four laws that matter, the negative-number trap that ruins hash and rotation code, modular inverses, and where I actually use this in production.