[Issue 15763] std.math.approxEqual is not symmetric

via Digitalmars-d-bugs digitalmars-d-bugs at puremagic.com
Fri Mar 31 17:23:04 PDT 2017


https://issues.dlang.org/show_bug.cgi?id=15763

Steven Schveighoffer <schveiguy at yahoo.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Keywords|                            |pull
             Status|NEW                         |ASSIGNED

--- Comment #2 from Steven Schveighoffer <schveiguy at yahoo.com> ---
Hm... also found an issue, because if rhs is a range, but lhs is a value, it
swaps the arguments and calls approxEqual(rhs, lhs). Clearly, if rhs is the
relative difference determination, you don't want to do this (as the comparison
isn't symmetrical).

PR: https://github.com/dlang/phobos/pull/5316

--


More information about the Digitalmars-d-bugs mailing list