log to modulus