Format.strip: 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 35-44 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=35&end_line=44 import Base import bend-lawful-stdlib@0.1.0.0/src/float/bin.bend as Bin # the same value with its low zero bits moved into the exponent and its # high zero bits dropped, so that equal values are equal terms def strip(neg: Bool, m: Bin.Bin, e: Nat) -> Val: match m: case Bin.BZ{}: Z{neg} case Bin.B0{r}: strip(neg, r, 1n+e) case Bin.B1{r}: Fin{neg, Bin.B1{Bin.trim(r)}, e} Uses (5): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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=trim https://jend.leeeet.dev/definition.txt?path=bend-lawful-stdlib@0.1.0.0/src/float/format.bend&name=Val