Bug 18727 – std.math.fmin 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:10:45Z
Last change time
2018-05-18T19:47:17Z
Keywords
bootcamp
Assigned to
petrug
Creator
Jack Stouffer

Comments

Comment #0 by jack — 2018-04-04T16:10:45Z
assert(fmin(2.0, real.nan) is real.nan); According to the C spec "If one of the two arguments is NaN, the value of the other argument is returned. Only if both arguments are NaN, NaN is returned."
Comment #1 by kinke — 2018-05-18T19:47:17Z