[Issue 4470] Problems with std.bigint mod and divide

d-bugmail at puremagic.com d-bugmail at puremagic.com
Fri Jul 16 04:53:43 PDT 2010


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



--- Comment #2 from yebblies <yebblies at gmail.com> 2010-07-16 04:53:41 PDT ---
My bad!  That should be:

unittest
{
    try
    {
        scope(success) assert(0);
        auto r1 = BigInt(6) % BigInt(0);
    } catch {}
    try
    {
        scope(success) assert(0);
        auto r1 = BigInt(6) % 0;
    } catch {}
    assert(BigInt(6) % BigInt(1) == 0);
    assert(BigInt(6) % 1 == 0);
    assert(BigInt(-6) % BigInt(-1) == 0);
    assert(BigInt(-6) % -1 == 0);
}

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