FR_Math: Trig Interpolation Error Analysis

All methods read the same 129-entry s0.15 quadrant cosine table (the one in src/FR_trig_table.h). Reference is JavaScript Math.cos() (IEEE-754 double). Sweep is −45° to +45° in 0.1° steps (901 samples). Errors are reported in LSBs of s0.15 (1 LSB ≈ 3.05e−5 absolute).

Per-angle error

Interpolated cos(θ) vs reference

Each method's output value over the same sweep, with the double-precision Math.cos reference overlaid as a dashed black line. The methods all sit very close to each other at this scale — use mouse-wheel to zoom in on a region, drag to pan, and toggle methods via the legend.

Statistics

Method min max mean std max |err| max |err| abs
How to read this: the chart shows (interpolated cos in s0.15) − (SCALE·Math.cos(θ)). A perfect method would sit on y = 0. A biased method drifts off center. A high-variance method oscillates. Click any method in the legend to toggle it. The "max |err| abs" column shows the same worst-case error converted from LSBs back to absolute units for sanity-checking against floating-point references.