4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-24 07:57:22 +08:00
Fabian Schriever 659096afe9 Fix error in fdim/f for infinities
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.
2020-10-14 10:54:14 -04:00
..
2020-10-14 10:54:14 -04:00
2016-02-17 17:06:46 -05:00
2000-02-17 19:39:52 +00:00
2020-10-14 10:54:08 -04:00
2020-10-14 10:54:03 -04:00