[Issue 13499] (float|double|real).compare functions improperly compare nan

d-bugmail at puremagic.com d-bugmail at puremagic.com
Tue Jan 30 01:40:58 UTC 2018


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

Francesco Mecca <me at francescomecca.eu> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
                 CC|                            |me at francescomecca.eu

--- Comment #2 from Francesco Mecca <me at francescomecca.eu> ---
What do you propose as the right solution?

The problem is mainly that the TypeInfo comparison returns an integer that has
no real meaning when the comparison is between a number and NaN.
Throwing an exception doesn't seem like the best solution to me.

--


More information about the Digitalmars-d-bugs mailing list