4
0
mirror of git://sourceware.org/git/newlib-cygwin.git synced 2025-01-25 00:27:19 +08:00
Fabian Schriever 18b4e0e518 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-03-10 15:11:23 +01:00
..
2020-03-10 15:11:23 +01:00
2016-02-17 17:06:46 -05:00
2000-02-17 19:39:52 +00:00
2020-01-21 15:17:43 -05:00
2019-10-31 14:52:04 -04:00