def mpow32_go

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

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

682def mpow32_go(fuel: Nat, +m: U32, +mp: U32, +b: U32, +acc: U32, st: U32 & Bool) -> U32:
683  match fuel st:
684    case 0n _:
685      acc
686    case 1n+f Tuple{e, True{}}:
687      acc
688    case 1n+f Tuple{+e, False{}}:
689      mpow32_go(f, m, mp, mont32(m, mp, b, b), mbit32(U32.is_eq(U32.and(e, 1), 1), m, mp, b, acc), (U32.shr(e), U32.is_zero(U32.shr(e))))

Uses (11)

Used by (1)