Skip to content

IEEE_BINARY_FALLBACK_KERNEL

const IEEE_BINARY_FALLBACK_KERNEL: object

Defined in: packages/math-numbers/src/ieee754/binary/kernels/fallback/fallback-kernel.ts:18

The portable kernel, installed by default.

Its batch has no crossing to amortise — it is a plain loop over the scalar ops — and exists so that a native kernel shipping no batch of its own still has a correct one to fall back to.

axpby: (a, x, b, y, format) => IeeeBinary<bigint>

a × x + b × y (BLAS-style AXPBY). Composed from two muls then ieeeBinaryAdd — three roundings, not a single fused one.

IeeeBinary

IeeeBinary

IeeeBinary

IeeeBinary

IeeeFormat

IeeeBinary<bigint>

axpy: (a, x, y, format) => IeeeBinary<bigint>

a × x + y (BLAS-style AXPY). Composed from mul then ieeeBinaryAdd — two roundings, not a single fused one.

IeeeBinary

IeeeBinary

IeeeBinary

IeeeFormat

IeeeBinary<bigint>

readonly batch: object

axpbyBatch: Ieee754BatchAxpbyFunction

Element-wise a × x + b × y, with a and b decoded once and broadcast.

axpyBatch: Ieee754BatchAxpyFunction

Element-wise a × x + y, with a decoded once and broadcast over count.

divBatch: Ieee754BatchBinaryFunction

Element-wise a / b, packing and unpacking each element in turn.

mulBatch: Ieee754BatchBinaryFunction

Element-wise a × b, packing and unpacking each element in turn — the portable batch, and the baseline a native one has to beat.

div: (a, b, format) => IeeeBinary<bigint>

A / b.

The dividend is scaled by 2^SCALE (SCALE = p + 2 extra guard/round/sticky bits) before integer division, giving a quotient of approximately p + 2 bits. The remainder provides the sticky bit for correct rounding.

IeeeBinary

IeeeBinary

IeeeFormat

IeeeBinary<bigint>

mul: (a, b, format) => IeeeBinary<bigint>

A × b.

Result significand: sig_a × sig_b (up to 2p bits), which is then normalised and rounded to p bits. The exponent sum accounts for the implicit 2^(p−1) scale on each operand.

IeeeBinary

IeeeBinary

IeeeFormat

IeeeBinary<bigint>