On Thu, Oct 11, 2012 at 2:20 AM, Steven D'Aprano firstname.lastname@example.org wrote:
E.g. log(x) should return -infinity if x underflows from a positive value, and a NaN if x underflows from a negative.
IEEE 754 disagrees. :-) Both log(-0.0) and log(0.0) are required to return -infinity (and/or signal the divideByZero exception).
And as for sqrt(-0.0) returning -0.0... Grr. I've never understood the motivation for that one, especially as it disagrees with the usual recommendations for complex square root (where the real part of the result *always* has its sign bit cleared).