Gfm.gfm.pow.go: def of bend-osdev-gf@0.1.1.0 Import: import bend-osdev-gf@0.1.1.0/gfm.bend as Gfm Lines 79-86 of bend-osdev-gf@0.1.1.0/gfm.bend: https://jend.leeeet.dev/read.txt?path=bend-osdev-gf@0.1.1.0/gfm.bend&start_line=79&end_line=86 import Base # a^e by squaring, over the 32 bits of e from the top def gfm.pow.go(n: Nat, +f: GfmField, +a: U32, +e: U32, +r: U32) -> U32: match n: case 0n: r case 1n+k: +sq = Gfm.mul(f, r, r) gfm.pow.go(k, f, a, U32.shl(e), Gfm.mul(f, sq, U32.or(U32.and(a, gfm.mask(U32.shrn(e, 31n))), U32.and(1, U32.not(gfm.mask(U32.shrn(e, 31n))))))) Uses (10): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Nat https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32 https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.and https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.not https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.or https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shl https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.shrn https://jend.leeeet.dev/definition.txt?path=bend-osdev-gf@0.1.1.0/gfm.bend&name=Gfm.mul https://jend.leeeet.dev/definition.txt?path=bend-osdev-gf@0.1.1.0/gfm.bend&name=GfmField https://jend.leeeet.dev/definition.txt?path=bend-osdev-gf@0.1.1.0/gfm.bend&name=gfm.mask