https://issues.dlang.org/show_bug.cgi?id=13963
mfx <[email protected]> changed: What |Removed |Added ---------------------------------------------------------------------------- Status|RESOLVED |REOPENED Resolution|FIXED |--- --- Comment #3 from mfx <[email protected]> --- Thanks for the fix, but we still have some problem here: import std.bigint; void main() { import std.typetuple : TypeTuple; import std.stdio : writeln; // assert that "y = x % b" has same value as "x %= b" void checkMod(T)(T a, T b) { BigInt x = a; auto y = x % b; x %= b; //assert(x == y); if (x != y) writeln("BitInt modulo ERROR: ", typeid(T), " ", a, " ", b, " ", x, " ", y); } foreach(T; TypeTuple!(byte, ubyte, short, ushort, int, uint, long, ulong)) { immutable T[] values = [T.min, T.min + 1, 0, T.max - 1, T.max]; foreach(a; values) foreach(b; values) if (b != 0) checkMod!T(a, b); } } --
