3 ms·
It's even worse than most people seem to realize. For many years the ISO standard for C included the line: "If both operands are nonnegative then the remainder
by williamkuszmaul 5y ago
It's even worse than most people seem to realize. For many years the ISO standard for C included the line:
"If both operands are nonnegative then the remainder is nonnegative; if not, the sign of the remainder is implementation-defined"
Fortunately, this was changed at some point between C '99 and C '11, so that now the remainder is consistently defined across all implementations.
- tinus_hn 5y agoAcross all implementations that fully support C99, which is not all implementations.