BigInt give incorrect results for a^^b for a select set of numbers:
12 ^^ 16
48 ^^ 8
48 ^^ 16
80 ^^ 8
112 ^^ 8
144 ^^ 8
176 ^^ 8
192 ^^ 16
208 ^^ 8
etc
Test case:
void main()
{
BigInt bpow(long a, long b)
{
auto r = BigInt(1);
while(b--)
r *= a;
return r
}
foreach(a; 0..1000)
{
foreach(b; 0..1000)
{
auto r1 = bpow(a, b);
auto r2 = BigInt(a) ^^ b;
assert(r1 == r2);
}
}
}
Version of std.bigint packaged with dmd2.047
Have not checked on other hardware/os