Bug 18728 – std.math.fdim does not handle nan correctly
Status
RESOLVED
Resolution
FIXED
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
All
OS
All
Creation time
2018-04-04T16:22:27Z
Last change time
2019-03-11T12:45:13Z
Keywords
bootcamp, pull
Assigned to
petrug
Creator
Jack Stouffer
Comments
Comment #0 by jack — 2018-04-04T16:22:27Z
assert(fdim(real.nan, 2.0) == 0);
According to the C spec "If either argument is NaN, NaN is returned"
Comment #1 by tiberiulepadatu14 — 2018-10-21T13:42:14Z
Can I work on this?
Comment #2 by dlang-bot — 2019-03-08T12:57:42Z
@tibi77 created dlang/phobos pull request #6896 "Fix Issue 18728 - std.math.fdim does not handle nan correctly" fixing this issue:
- Fix Issue 18728 - std.math.fdim does not handle nan correctly
https://github.com/dlang/phobos/pull/6896
Comment #3 by dlang-bot — 2019-03-11T12:45:13Z
dlang/phobos pull request #6896 "Fix Issue 18728 - std.math.fdim does not handle nan correctly" was merged into master:
- 0827012c3d08000bf75e3fa6d94d72f66d26f153 by Lepadatu Tiberiu:
Fix Issue 18728 - std.math.fdim does not handle nan correctly
Add the real unittests.
Changed the condition to match what thewilsonator said.
https://github.com/dlang/phobos/pull/6896