digitalmars.D.bugs - [Issue 5566] New: [64-bit] More erratic FP results with size_t
- d-bugmail puremagic.com (29/29) Feb 12 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5566
- d-bugmail puremagic.com (9/9) Feb 12 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5566
- d-bugmail puremagic.com (13/13) Feb 12 2011 http://d.puremagic.com/issues/show_bug.cgi?id=5566
http://d.puremagic.com/issues/show_bug.cgi?id=5566 Summary: [64-bit] More erratic FP results with size_t Product: D Version: D2 Platform: x86_64 OS/Version: Windows Status: NEW Keywords: wrong-code Severity: normal Priority: P2 Component: DMD AssignedTo: nobody puremagic.com ReportedBy: dsimcha yahoo.com --- Comment #0 from David Simcha <dsimcha yahoo.com> 2011-02-12 08:37:43 PST --- I think this bug might have the same root cause as bug 5565. It was reduced from completely different code and I don't really understand the root cause of either very well, though, so I'm filing a separate bug report in case I'm wrong. Even if it is related to 5565, this test case is simpler. import std.math, std.stdio; double fun(ulong k, ulong n, double p) { return pow(1.0 - p, cast(double) n); } void main() { // Should print 0.8 ^ 10 = 0.1073741824. Prints 0.956352. writeln(fun(0, 10, 0.2)); } -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 12 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5566 --- Comment #1 from David Simcha <dsimcha yahoo.com> 2011-02-12 08:38:43 PST --- Argh, again I forgot to mention, this test case does not reproduce the bug if inlining is enabled, probably because fun() gets inlined. In the larger case I reduced it from, inlining could be enabled and the bug would still be reproduced. -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 12 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5566 Walter Bright <bugzilla digitalmars.com> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|NEW |RESOLVED CC| |bugzilla digitalmars.com Resolution| |FIXED --- Comment #2 from Walter Bright <bugzilla digitalmars.com> 2011-02-12 21:54:05 PST --- https://github.com/D-Programming-Language/dmd/commit/4a61292e28a47bd7808eb4b1ff459537599beec6 https://github.com/D-Programming-Language/dmd/commit/b496185f71837483bf478315a8a62c53d6eae174 -- Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email ------- You are receiving this mail because: -------
Feb 12 2011