def eg_neg

bend-collections-laws-math@1.0.0.0 · spec/math/number.bend:53

import bend-collections-laws-math@1.0.0.0/spec/math/number.bend as Number
import Base
import bend-collections-laws-math@1.0.0.0/src/math/number.bend as NB

53def eg_neg(+a: Nat, +b: Nat, r: NB.EGcd) -> Nat:
54  match r:
55    case NB.EG{+g, +x, +y, neg}:
56      match neg:
57        case True{}:
58          Nat.add(g, Nat.mul(a, x))
59        case False{}:
60          Nat.add(g, Nat.mul(b, y))

Uses (5)

Used by (4)