`simulate` compared the remaining time against `config.step * 1e-12` to
decide whether the run had reached `config.end`. Repeated `time = time
+ step` additions drift from the exact grid by more than that after a
few hundred steps (e.g. 0.0..=5.0 step 0.01), so an extra near-zero
duration RK4 step snuck in right at the end, producing a spurious
duplicate-looking final sample (502 rows instead of the expected 501
for a 500-step run). This silently inflated row counts in simulate,
forecast, validate, backtest, and report output. Scaled the tolerance
to the step size (1e-6 instead of 1e-12) so it comfortably absorbs
summation drift while staying far smaller than any real remaining
sub-step. Added a regression test pinning the exact sample count for
a run that previously tripped this.
Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>