[llvm-bugs] [Bug 34100] New: [APFloat] DoubleAPFloat::changeSign results in unusual values.
llvm-bugs at lists.llvm.org
Mon Aug 7 04:26:29 PDT 2017
Bug ID: 34100
Summary: [APFloat] DoubleAPFloat::changeSign results in unusual
Component: Support Libraries
Assignee: unassignedbugs at nondot.org
Reporter: edy.burt at gmail.com
CC: llvm-bugs at lists.llvm.org
`DoubleAPFloat::make*` always uses positive zero `Floats`, even if
`Floats` becomes negative (for a `Neg=true` argument).
But `DoubleAPFloat::changeSign` changes *both* `Floats` and `Floats`,
even when the latter is zero.
That makes negating a positive zero or infinity that is *different* than the
ones created by `makeZero(true)` and `makeInf(true)`, respectively.
My fix would be to guard the `Floats.changeSign();` call by
You are receiving this mail because:
You are on the CC list for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the llvm-bugs