def f16_sub

bendtorch@1.3.0.0 · dtype.bend:79

import bendtorch@1.3.0.0/dtype.bend as Dtype
import Base

79def f16_sub(+a: U32) -> U32:
80  +mant = ((a .&. 8388607 : U32) .|. 8388608 : U32)
81  +sh = U32.to_nat((126 - U32.shrn(a, 23n) : U32))
82  f16_sub2(U32.shrn(mant, sh), (mant .&. (U32.shln(1, sh) - 1 : U32) : U32), U32.shln(1, Nat.sub(sh, 1n)))

Uses (9)

Used by (1)