adc static method

List<BigInt> adc(
  1. BigInt a,
  2. BigInt b,
  3. BigInt carry
)

Implementation

static List<BigInt> adc(BigInt a, BigInt b, BigInt carry) {
  final BigInt sum = a + b + carry;
  assert(sum <= BinaryOps.maxU128);

  final BigInt low = sum.toU64;
  final BigInt high = (sum >> 64);
  assert(high <= BinaryOps.maxU64);
  return [low, high];
}