def ulp_cls
import bend-collections-laws-math@1.0.0.0/src/math/f64.bend as F64import Base
import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as W
897def ulp_cls(+x: F64, top: Bool) -> F64:
898 match top:
899 case True{}:
900 nan_or(inf(False{}), nz(frac(x)))
901 case False{}:
902 round_w(False{}, dexp(x), W.U64{1, 0})