Sept. 24, 2004
7:20 p.m.
Ken Pizzini <"tz."@explicate.org> writes:
The C language definition has typically left as "implementation defined" whether the result of (-42)%100 is -42 or +58
That was true for C89, but it's not true for C99, which standardized on "Fortran" integer division, so that (-42)%100 is -42 and (-42)/100 is 0. It may be worth recording for older C89 systems that don't implement Fortran division, not that I know of any; but for newer systems we can rely on the Fortran model.