Modular arithmetic functions for bc(1)