auto x = BigInt("100"); BigInt y = 123 + x; assert(y == BigInt("223")); BigInt z = 123 - x; assert(z == BigInt("23")); // Dividing a built-in integer type by BigInt always results in // something that fits in a built-in type, so the built-in type is // returned, not BigInt. assert(is(typeof(1000 / x) == int)); assert(1000 / x == 10);
Implements operators with built-in integers on the left-hand side and BigInt on the right-hand side.