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)
commitbef256f49b77b17503b23699466d9bfc2f02d65f
tree97f574bcfe3cd4b3f4bfcdcb2b576f2dc7721550
parentc50f986b4d8ecbf3437c67e987e26e268ef5f06a
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.

git-svn-id: https://llvm.org/svn/llvm-project/llvm/trunk@210428 91177308-0d34-0410-b5e6-96231b3b80d8
lib/Support/APFloat.cpp
unittests/ADT/APFloatTest.cpp