mod() -> signAwareModulo