def of_nat_z
import bend-collections-laws-crypto@1.0.0.0/src/math/f64.bend as F64import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/natural.bend as M
616def of_nat_z(+n: Nat, z: Bool) -> F64:
617 match z:
618 case True{}:
619 zero(False{})
620 case False{}:
621 round_pack(False{}, Nat.add(5117n, M.bit_length(n)), sig63(n, M.bit_length(n), Nat.is_le(M.bit_length(n), 63n)))