def Gf8Tab.div

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

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

98# a / b = exp[log a + 255 - log b], or 0 if either is 0 (as Gf8.div)
99def Gf8Tab.div(t: Gf8Tab, a: U32, b: U32) -> Gf8Tab & U32:
100  +x = G.Gf8.elt(a)
101  +y = G.Gf8.elt(b)
102  gf8tab.two.pick(Bool.or(U32.is_eq(x, 0), U32.is_eq(y, 0)), t, x, y, True{})

Uses (8)

Used by (0)

No other definition uses this definition.