September 19, 2014 [Issue 13499] New: float.compare and double.compare functions improperly compare nan | ||||
---|---|---|---|---|
| ||||
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@puremagic.com Reporter: schveiguy@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. -- |
Copyright © 1999-2021 by the D Language Foundation