IEEE_BINARY_FALLBACK_KERNEL
constIEEE_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.
Type Declaration
Section titled “Type Declaration”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.
Parameters
Section titled “Parameters”format
Section titled “format”Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”format
Section titled “format”Returns
Section titled “Returns”IeeeBinary<bigint>
readonlybatch:object
batch.axpbyBatch
Section titled “batch.axpbyBatch”axpbyBatch:
Ieee754BatchAxpbyFunction
Element-wise a × x + b × y, with a and b decoded once and broadcast.
batch.axpyBatch
Section titled “batch.axpyBatch”axpyBatch:
Ieee754BatchAxpyFunction
Element-wise a × x + y, with a decoded once and broadcast over count.
batch.divBatch
Section titled “batch.divBatch”divBatch:
Ieee754BatchBinaryFunction
Element-wise a / b, packing and unpacking each element in turn.
batch.mulBatch
Section titled “batch.mulBatch”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.
Parameters
Section titled “Parameters”format
Section titled “format”Returns
Section titled “Returns”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.
Parameters
Section titled “Parameters”format
Section titled “format”Returns
Section titled “Returns”IeeeBinary<bigint>