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

--- Comment #0 from David Simcha <> 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:
------- You are receiving this mail because: -------

Reply via email to