[Issue 13499] New: float.compare and double.compare functions improperly compare nan
via Digitalmars-d-bugs
digitalmars-d-bugs at puremagic.com
Fri Sep 19 12:20:30 PDT 2014
https://issues.dlang.org/show_bug.cgi?id=13499
Issue ID: 13499
Summary: float.compare and double.compare functions improperly
compare nan
Product: D
Version: D2
Hardware: x86
OS: All
Status: NEW
Severity: normal
Priority: P1
Component: druntime
Assignee: nobody at puremagic.com
Reporter: schveiguy at yahoo.com
void main()
{
float a, b=1;
assert(!(a < b));
assert(typeid(float).compare(&a, &b) < 0);
}
The two asserts are contradicting. compare should return -1 only if a < b.
Related to issue 13420.
--
More information about the Digitalmars-d-bugs
mailing list