First page Back Continue Last page Overview Graphics


For example, consider the following expression, the modulo of a negative integer by a positive integer.

If you mostly program in ruby, you are probably used to this returning positive 6, but in C90, the result is implementation dependent, and in C99, the result is negative 4.

In home_run, the modolo is used in various places like determining the day of the week given the julian date, which should be returned as a positive number.