[Issue 5568] A problem with BigInt modulus
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 19 06:16:38 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5568
--- Comment #6 from Don <clugdbug at yahoo.com.au> 2011-02-19 06:13:57 PST ---
And the original test case is:
import std.bigint;
void main() {
BigInt m = (BigInt(1) << (4846+4843) ) - 1;
BigInt a = (BigInt(1) << 4846 ) - 1;
BigInt b = (BigInt(1) << (4846*2 + 4843)) - 1;
BigInt c = (BigInt(1) << (4846*2 + 4843*2)) - 1;
BigInt w = c - b + a;
assert(w % m == 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