[Issue 2987] New: D2 phobos BigInt opMul doesn't work correctly

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri May 15 19:11:42 PDT 2009


http://d.puremagic.com/issues/show_bug.cgi?id=2987

           Summary: D2 phobos BigInt opMul doesn't work correctly
           Product: D
           Version: 2.030
          Platform: PC
        OS/Version: Windows
            Status: NEW
          Keywords: patch
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: bugzilla at digitalmars.com
        ReportedBy: rinick at gmail.com


It won't pass this test

 BigInt a = 10;
 BigInt b = a * a;
 foreach (i; 0..100)
 {
    assert(a * a == b);
    a *= i;
    b *= i * i;
 }

To fix this bug.
Find this around BigInt.d line 907

    c = updateShr(c);

replace it with

    c = updateUShr(c);

-- 
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