def Int.add_ov.go

bend-kit-int@0.2.0.0 · int.bend:178

import bend-kit-int@0.2.0.0/int.bend as Int
import Base

178def Int.add_ov.go(+n: Nat, s: Bool, a: Word(n), b: Word(n), +r: Word(n)) ->
179  Bool & Word(n):
180  match s:
181    case True{}:
182      (Int.msb(n, Word.and(n, Word.xor(n, a, r), Word.xor(n, b, r))), r)
183    case False{}:
184      (Cmp.is_lt(Word.cmp(n, r, a)), r)

Uses (10)

Used by (1)