Calculates the positive remainder of two BigInt values.
static BigInt positiveMod(BigInt a, BigInt b) { final result = a % b; return result >= BigInt.zero ? result : b + result; }