def exp.nat

yaml-for-bend@0.1.1.0 · num.bend:145

import yaml-for-bend@0.1.1.0/num.bend as Num
import Base

145# Exponent digits as a Nat, capped past where a double ends (about 308).
146def exp.nat(+s: String) -> Nat:
147  +n = big.small(s, 0n)
148  when(Nat, Bool.or(Nat.is_gt(String.length(s), 3n), Nat.is_gt(n, 999n)), u => 999n, u => n)

Uses (7)

Used by (1)