def minv32
import bend-collections-laws-math@1.0.0.0/src/math/w64.bend as W64import Base
649# -1 / m mod 2^32 for odd m
650def minv32(+m: U32) -> U32:
651 U32.sub(0, inv32_step(m, inv32_step(m, inv32_step(m, inv32_step(m, m)))))
Uses (3)
Used by (6)
- bend-collections-laws-math@1.0.0.0/src/math/w64:mont32_ok
- bend-collections-laws-math@1.0.0.0/src/math/w64:mpow32
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32mont:mok_inv
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32mont:mok_inv_o
- bend-collections-laws-math@1.0.0.0/proofs/math/typed/u32mont:mok_odd
- …