[Issue 9937] New: CTFE floats don't overflow correctly
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Tue Apr 16 04:14:58 PDT 2013
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: nobody at puremagic.com
ReportedBy: clugdbug at yahoo.com.au
--- Comment #0 from Don <clugdbug at yahoo.com.au> 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: -------
More information about the Digitalmars-d-bugs
mailing list