Format.add.fin.cmp: def of bend-lawful-stdlib@0.1.0.0 Import: import bend-lawful-stdlib@0.1.0.0/src/float/format.bend as Format Lines 99-107 of bend-lawful-stdlib@0.1.0.0/src/float/format.bend: https://jend.leeeet.dev/read.txt?path=bend-lawful-stdlib@0.1.0.0/src/float/format.bend&start_line=99&end_line=107 import Base import bend-lawful-stdlib@0.1.0.0/src/float/bin.bend as Bin # add two finite values once their mantissas share the exponent e def add.fin.cmp(f: Format, na: Bool, nb: Bool, a: Bin.Bin, b: Bin.Bin, e: Nat, c: Cmp) -> Val: match c: case LT{}: round(f, nb, Bin.sub(b, a), e) case EQ{}: Z{False{}} case GT{}: round(f, na, Bin.sub(a, b), e) Uses (8): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Cmp https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=bend-lawful-stdlib@0.1.0.0/src/float/bin.bend&name=Bin https://jend.leeeet.dev/definition.txt?path=bend-lawful-stdlib@0.1.0.0/src/float/bin.bend&name=sub https://jend.leeeet.dev/definition.txt?path=bend-lawful-stdlib@0.1.0.0/src/float/format.bend&name=Format https://jend.leeeet.dev/definition.txt?path=bend-lawful-stdlib@0.1.0.0/src/float/format.bend&name=Val https://jend.leeeet.dev/definition.txt?path=bend-lawful-stdlib@0.1.0.0/src/float/format.bend&name=round