def BigInt.cmp

bend-kit-bignum@0.1.0.0 · bigint.bend:371

import bend-kit-bignum@0.1.0.0/bigint.bend as Bigint
import Base

371def BigInt.cmp(a: BigInt, b: BigInt) -> Cmp:
372  match a b:
373    case BigInt{False{}, x} BigInt{False{}, y}:
374      Mag.cmp(x, y)
375    case BigInt{True{}, x} BigInt{True{}, y}:
376      Mag.cmp(y, x)
377    case BigInt{False{}, x} BigInt{True{}, y}:
378      GT{}
379    case BigInt{True{}, x} BigInt{False{}, y}:
380      LT{}

Uses (4)

Used by (5)