Compare price to modular arithmetic