APFloat: x - NaN needs to flip the signbit of NaN when x is a number.
authorStephen Canon <scanon@apple.com>
Sun, 8 Jun 2014 16:53:31 +0000 (16:53 +0000)
committerStephen Canon <scanon@apple.com>
Sun, 8 Jun 2014 16:53:31 +0000 (16:53 +0000)
commitd327828141855d7317116e9ef0bc74924b8527d9
tree87a2a502b243a3a753ac71837c4505077a5a7651
parent960ea3f01831cd3f990e33e3658f58b12906917c
APFloat: x - NaN needs to flip the signbit of NaN when x is a number.

Because we don't have a separate negate( ) function, 0 - NaN does double-duty as the IEEE-754 negate( ) operation, which (unlike most FP ops) *does* attach semantic meaning to the signbit of NaN.

llvm-svn: 210428
llvm/lib/Support/APFloat.cpp
llvm/unittests/ADT/APFloatTest.cpp