Repository navigation
fix: correct scalar KL arithmetic and plot argument handling - #30
aidanmoller wants to merge 1 commit into
Conversation
Numerical fixes and runtime cost • Retain small variance ratios before taking logarithms. • Recover finite signal and dispersion after intermediate overflow. • These fixes increase ordinary scalar helper time by 19.5% per pair and 9.1% for the tested vector workload. • Exclude the slower series calculation for nearly equal variances. Plots and documentation • Allow plot labels and limits to override defaults without argument errors. • Correct the online example's count of anchors reaching the record end. • Remove the claim that a censored range is necessarily a lower bound. • Explain streamed/retained lag limits and the finite threshold interval. Validation • Add regression tests for small ratios, overflow and plot arguments. • Pass 7,784 assertions and saved MATLAB comparisons at existing tolerances. • Local package check: zero errors, zero warnings, one HTML validation note.
max578
left a comment
There was a problem hiding this comment.
Hi Aidan,
Thanks, this looks good and I am approving. I graded the scalar kernel on ea66bd0 against a 2000-bit Rmpfr reference on the exact inputs, with inputs chosen to reach each new branch: small and subnormal variance ratios, ratio overflow, and signals across the overflow midpoint. Everything is within 3 ulp, where b0f7141 gave Inf or NaN in each of those sets. Ordinary signals are bit-identical to b0f7141. The new tests fail on b0f7141, and the full suite passes here, as does test-15 with the external MATLAB fixtures.
One nit, not blocking. The plot methods now drop unnamed arguments in ... without a warning, because modifyList() ignores elements without names. On b0f7141, plot(cr, c(0, 5)) passed c(0, 5) to plot.default() as xlim. On ea66bd0 the x-axis stays at the default range. Could you pass unnamed arguments through, or warn when they are dropped?
Best wishes,
Max
Numerical fixes and runtime cost
Plots, examples and documentation
Optional precision improvement (not in this commit)