www.digitalmars.com         C & C++   DMDScript  

digitalmars.D.bugs - [Issue 8022] New: BigInt division bug (2)

reply d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8022

           Summary: BigInt division bug (2)
           Product: D
           Version: D2
          Platform: x86
        OS/Version: Windows
            Status: NEW
          Severity: normal
          Priority: P2
         Component: Phobos
        AssignedTo: nobody puremagic.com
        ReportedBy: yuri.musashi.miwa.tamura gmail.com



2012-05-03 01:20:17 PDT ---
(in dmd 2.059)

import std.stdio, std.bigint;

void main() {
    BigInt n = BigInt(2) / BigInt(-3);
    writeln(n);
    writeln(n == 0);
}

output:
-0
false

I think correct output is 0 and true.

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
May 03 2012
next sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8022




Commits pushed to master at https://github.com/D-Programming-Language/phobos

https://github.com/D-Programming-Language/phobos/commit/261889c656c66177843c936643ae1478cb75b520
Fix issue 8022 BigInt division bug (2)

https://github.com/D-Programming-Language/phobos/commit/94cece63b5c2163420ee89e733bbb0b0160bb573


Fix issue 8022 BigInt division bug (2)

-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 01 2012
prev sibling parent d-bugmail puremagic.com writes:
http://d.puremagic.com/issues/show_bug.cgi?id=8022


Don <clugdbug yahoo.com.au> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
             Status|NEW                         |RESOLVED
                 CC|                            |clugdbug yahoo.com.au
         Resolution|                            |FIXED


-- 
Configure issuemail: http://d.puremagic.com/issues/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
Jul 03 2012