def minv

bend-collections-laws-math@1.0.0.0 · src/math/w64.bend:583

import bend-collections-laws-math@1.0.0.0/src/math/w64.bend as W64
import Base
import bend-collections-laws-math@1.0.0.0/src/math/u64.bend as W

583# -1 / m mod 2^64 for odd m (m is its own inverse mod 8; five Newton steps
584# reach 96 >= 64 bits)
585def minv(+m: W.U64) -> W.U64:
586  sub(W.U64{0, 0}, inv_step(m, inv_step(m, inv_step(m, inv_step(m, inv_step(m, m))))))

Uses (3)

Used by (8)