operator * method

Uint128 operator *(
  1. Uint128 other
)

Multiply, keeping only the low 128 bits (wrapping). Built entirely from Uint64.widenMul (the full 64x64->128 product of the low limbs) plus wrapping 64-bit multiplies for the cross terms — the same decomposition Uint64.operator* itself uses one level down.

Implementation

Uint128 operator *(Uint128 other) {
  final (mHi, mLo) = Uint64.widenMul(_lo, other._lo);
  final cross =
      (_hi * other._lo) + (_lo * other._hi); // both already mod 2^64
  final hi = mHi + cross;
  return Uint128._(hi, mLo);
}