On Thu, 1 Oct 2015, Michael Matz wrote: > both cases. The catch is that strictly speaking (NaN * -1.0) needs to > deliver NaN, not -NaN (operations involving quiet NaNs need to provide > one of the input NaNs as result), and here both are not equivalent. OTOH > the sign of NaNs isn't specified, so I think we could reasonably decide to > not care about this case (it would have to be checked if the hardware > multiplication even follows that rule, otherwise it's moot anyway).
"For all other operations, this standard does not specify the sign bit of a NaN result, even when there is only one input NaN, or when the NaN is produced from an invalid operation." (IEEE 754-2008, 6.3 The sign bit). So no need to care about this case. -- Joseph S. Myers jos...@codesourcery.com