http://d.puremagic.com/issues/show_bug.cgi?id=9937
Summary: CTFE floats don't overflow correctly
Product: D
Version: D1 & D2
Platform: All
OS/Version: All
Status: NEW
Severity: normal
Priority: P2
Component: DMD
AssignedTo: [email protected]
ReportedBy: [email protected]
--- Comment #0 from Don <[email protected]> 2013-04-16 04:14:56 PDT ---
This should pass. The multiply by 2 must cause an infinity, at least when x is
stored.
---
int blah()
{
float x = float.max;
x *= 2;
x /= 2;
assert(x == float.infinity);
return 1;
}
static assert(blah());
---
--
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------