def sq_pos

bend-collections-laws-crypto@1.0.0.0 · src/math/f64.bend:494

import bend-collections-laws-crypto@1.0.0.0/src/math/f64.bend as F64
import Base
import bend-collections-laws-crypto@1.0.0.0/src/math/u64.bend as W

494def sq_pos(+e: Nat, +f: W.U64, negative: Bool) -> F64:
495  match negative:
496    case True{}:
497      nan()
498    case False{}:
499      sq_n(norm_e(e, f), norm_f(e, f), Nat.is_eq(Nat.mod(norm_e(e, f), 2n), 1n))

Uses (10)

Used by (1)