[Issue 5568] A problem with BigInt modulus
d-bugmail at puremagic.com
d-bugmail at puremagic.com
Sat Feb 19 00:53:30 PST 2011
http://d.puremagic.com/issues/show_bug.cgi?id=5568
--- Comment #5 from Don <clugdbug at yahoo.com.au> 2011-02-19 00:50:51 PST ---
Reduced test case:
import std.bigint;
void main() {
enum int Y = 2008;
BigInt m = (BigInt(1) << (Y*1 + 1)) - 1;
BigInt b = (BigInt(1) << (Y*2 + 1)) - 1;
BigInt c = (BigInt(1) << (Y*3 + 1)) - 1;
BigInt w = c - b;
w = w % m;
}
This trips an assert when Phobos is compiled in debug mode.
--
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