[Issue 4872] New: std.bigint problem with negative numbers

d-bugmail at puremagic.com d-bugmail at puremagic.com
Wed Sep 15 14:10:37 PDT 2010


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

           Summary: std.bigint problem with negative numbers
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody at puremagic.com
        ReportedBy: bearophile_hugs at eml.cc


--- Comment #0 from bearophile_hugs at eml.cc 2010-09-15 14:10:05 PDT ---
With dmd 2.049beta this asserts:


import std.bigint: BigInt;
void main() {
    assert(((BigInt(3) * BigInt(-2)) + (BigInt(-5) * BigInt(-1))) ==
BigInt(-1));
}


I think in some situations BigInt(3)*BigInt(-2) == BigInt(6).

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