Comment #0 by electrolysis.jp+d — 2015-02-04T12:52:08Z
Separated from issue 13963.
Not only int, but any integral types smaller than (u)long.
---
import std.bigint;
void main()
{
auto x = BigInt(-3); // Negative BigInt
x %= 3; // int
assert(x == BigInt(0), toDecimalString(x)); // Bad, x is invalid "-0"
x = BigInt(-3);
x %= 3L; // long
assert(x == BigInt(0)); // Good, different implementation
}
Comment #1 by github-bugzilla — 2015-02-07T17:43:29Z