Gfm.Gfm.log.go: def of bend-osdev-gf@0.1.1.0 Import: import bend-osdev-gf@0.1.1.0/gfm.bend as Gfm Lines 108-117 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=108&end_line=117 import Base # the least i with x^i = a, searching i below 2^m - 1 (0 for a = 0) def Gfm.log.go(n: Nat, hit: Bool, +f: GfmField, +a: U32, +cur: U32, +i: U32) -> U32: match n hit: case _ True{}: i case 0n False{}: 0 case 1n+k False{}: +nxt = Gfm.xtime(f, cur) Gfm.log.go(k, U32.is_eq(nxt, a), f, a, nxt, U32.add(i, 1)) Uses (7): https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=Bool 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.add https://jend.leeeet.dev/definition.txt?path=Base/base.bend&name=U32.is_eq https://jend.leeeet.dev/definition.txt?path=bend-osdev-gf@0.1.1.0/gfm.bend&name=Gfm.xtime https://jend.leeeet.dev/definition.txt?path=bend-osdev-gf@0.1.1.0/gfm.bend&name=GfmField