Почему в Си (gcc (GCC) 7.2.0)
при вычислении целого от

, где numerator < 0 или denominator < 0
производится округление в сторону большего?
при вычислении дробной части от

, где numerator < 0
получается отрицательное число?
По стандарту языка C.
Цитата:
6.5.5.6 When integers are divided, the result of the / operator is the algebraic quotient with any fractional part discarded.(105) If the quotient a/b is representable, the expression (a/b)*b + a%b shall equal a; otherwise, the behavior of both a/b and a%b is undefined.
(105)This is often called "truncation toward zero".