def two_prod_e

bendtorch@1.3.0.0 · dtype.bend:544

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

544# a · b exactly as p + e
545def two_prod_e(+a: F32, +b: F32, +p: F32) -> F32:
546  +ah = split_hi(a)
547  +al = (a - ah : F32)
548  +bh = split_hi(b)
549  +bl = (b - bh : F32)
550  ((((((ah * bh : F32) - p : F32) + (ah * bl : F32) : F32) + (al * bh : F32) : F32)) + (al * bl : F32) : F32)

Uses (5)

Used by (1)