def Gf8Tab.inv

bend-osdev-gf@0.1.1.0 · tables.bend:117

import bend-osdev-gf@0.1.1.0/tables.bend as Tables
import Base
import bend-osdev-gf@0.1.1.0/gf.bend as G

117# a^-1 = exp[255 - log a], and the inverse of 0 is 0
118def Gf8Tab.inv(t: Gf8Tab, a: U32) -> Gf8Tab & U32:
119  +x = G.Gf8.elt(a)
120  gf8tab.inv.pick(U32.is_eq(x, 0), t, x)

Uses (6)

Used by (3)