Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: Use clearer numbers in the implied behavior

...

The C definition of the % operator implies the following behavior:

Code Block
 1711 %  35  ->  21
 1711 % -35  ->  21
-1711 %  35  -> -21
-1711 % -35  -> -21

The result has the same sign as the dividend (the first operand in the expression).

...