← Back to index
|
Original Bugzilla link
Bug 21606 – pow(NaN,0) gives 1 not NaN
Status
RESOLVED
Resolution
INVALID
Severity
normal
Priority
P1
Component
phobos
Product
D
Version
D2
Platform
x86_64
OS
Linux
Creation time
2021-02-03T11:40:36Z
Last change time
2021-03-01T14:34:49Z
Keywords
pull
Assigned to
No Owner
Creator
Berni44
Comments
Comment #0
by bugzilla — 2021-02-03T11:40:36Z
unittest { assert(isNaN(pow(float.nan,0))); assert(isNaN(pow(double.nan,0))); assert(isNaN(pow(real.nan,0))); }
Comment #1
by bugzilla — 2021-02-03T11:42:42Z
I've created a fix already, but have to wait for PR #7783 to be merged.
Comment #2
by dlang-bot — 2021-03-01T14:11:08Z
@berni44 created dlang/phobos pull request #7819 "Fix Issue 21606 - pow(NaN,0) gives 1 not NaN" fixing this issue: - Fix Issue 21606 - pow(NaN,0) gives 1 not NaN
https://github.com/dlang/phobos/pull/7819
Comment #3
by bugzilla — 2021-03-01T14:34:49Z
I just found out, that this is a weird exception of the rule, that all calculations including NaNs should be NaN...