Skip to main content

Module residual

Module residual 

Source
Expand description

FP16 residual helpers (Phase 15).

compute_residual(original, reconstructed) = (original - reconstructed) stored as little-endian IEEE 754 binary16, matching Python’s (original - reconstructed).astype(np.float16).tobytes().

apply_residual_into adds the decoded residual back into a reconstruction buffer in place.

Functions§

apply_residual_into
Decode a residual byte-slice as f16 LE values and add them in place into values.
compute_residual
Compute the per-element residual original - reconstructed as little-endian f16 bytes.