JuliaLang/julia — pull request #7883 by Keno (2014-08-07 04:59:04+00:00)
Title: Fix #7868

Somewhere in the LLVM 3.4 timeframe somebody decided that the constant folder should always return positive NaNs. Anyway, a couple of months somebody finally realized that you can't implement IEEE negate if your Constant Folder doesn't produce negative NaNs, so the constant folder for fsub was made to preserve sign bits. This is the resulting mess :cry: Also IEEE floating point experts, is there anything in there (other than the negate argument), that would let me argue that -1.0*NaN should be -NaN rather than +NaN?