Opened 4 weeks ago
abs for IEEE floating point is slightly wrong.
|Reported by:||augustss||Owned by:|
|Type of failure:||None/Unknown||Difficulty:||Unknown|
|Test Case:||Blocked By:|
Evaluating abs(-0) gives the answer -0. This unexpected since it breaks invariants like 1/(abs x) >= 0. So abs(-0) should be 0. This is also the norm for other languages.
Together with this change, signum should also be changed so signum(-0) is -0. This maintains the invariant abs x * signum x == x.