mirror of
git://sourceware.org/git/newlib-cygwin.git
synced 2025-01-25 00:27:19 +08:00
18b4e0e518
The comparison c == FP_INFINITE causes the function to return +inf as it expects x = +inf to always be larger than y. This shortcut causes several issues as it also returns +inf for the following cases: - fdim(+inf, +inf), expected (as per C99): +0.0 - fdim(-inf, any non NaN), expected: +0.0 I don't see a reason to keep the comparison as all the infinity cases return the correct result using just the ternary operation.