just in case Java doesn't optimize remainder
to make @lucaswerkmeister happy