Decimal.Decimal.read.shift: def of bend-kit-bignum@0.1.0.0 Import: import bend-kit-bignum@0.1.0.0/decimal.bend as Decimal Lines 411-417 of bend-kit-bignum@0.1.0.0/decimal.bend: https://jend.leeeet.dev/read.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&start_line=411&end_line=417 import Base import bend-kit-bignum@0.1.0.0/bigint.bend as Big # A negative exponent adds scale; a positive one spends scale, then multiplies. def Decimal.read.shift(u: Big.BigInt, +sc: Nat, eneg: Bool, +e: Nat) -> Decimal: match eneg: case True{}: Decimal{u, Nat.add(sc, e)} case False{}: Decimal{Decimal.up(u, Nat.sub(e, sc)), Nat.sub(sc, e)} Uses (7): 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=Base/base.bend&name=Nat.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat.sub https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/bigint.bend&name=BigInt https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&name=Decimal https://jend.leeeet.dev/definition.txt?path=bend-kit-bignum@0.1.0.0/decimal.bend&name=Decimal.up