Published
Preserving Welch confidence intervals near zero
A public-source verifier repair retains precision before nearly equal quantities are subtracted, with independent reference checks around the boundary where the repair takes over.
Keep a small interval endpoint from losing its useful digits
A Welch confidence interval can lose accuracy when one endpoint is close to zero. The public nomue verifier's development source now repairs this case by retaining extra precision through the calculations that produce the endpoint, rather than correcting only the final subtraction.
The repair was merged in Verifier PR #21 at 421756e. Its source and regression tests are public. As of September 19, it is not included in the published npm release candidate 0.2.1-rc.1; a new package version and release evidence are still required.
The error starts before the subtraction
Welch's interval describes uncertainty around the difference between two independent group means. Each endpoint combines that difference with a margin calculated from the standard error and a Student-t critical value. When the difference and margin nearly cancel, small errors in either can dominate the much smaller endpoint.
Improving the last subtraction alone cannot recover digits already lost when calculating the variances, degrees of freedom or critical value. The repair instead carries extra precision through those steps and rounds the endpoints at the end. The normal calculation path remains in use away from the cancellation region.
This is a different problem from the released one-degree-of-freedom probability repair. That change preserves small probability differences near the center of a distribution; this one addresses confidence-interval endpoints formed from nearly equal quantities.
Check the boundary of the repair, not just its best example
The reference generator starts from the exact values represented by the floating-point observations. It calculates moments with rational arithmetic and uses mpmath at 100 decimal digits for the reference calculation. Student-t quantiles obtained through beta inversion are cross-checked by integrating the Student density. The implementation under test does not supply its own expected answers.
The retained synthetic panel contains 96 rows: 72 exercise the refined path and 24 the normal path. It covers both endpoint signs, four sample-size pairs and exact power-of-two rescaling. Tests also check group reversal, input order and isolation from a caller's decimal-arithmetic settings.
Review exposed a gap in the first repair's switching condition. Restoring that earlier condition makes all 48 newly covered refined-path rows fail the stricter accuracy check; four also exceed the registered endpoint tolerance. The corrected condition passes all 96 rows. This distinguishes a development accuracy target from the Protocol's unchanged acceptance tolerance.
Preserve the calculation's meaning
The refined path updates the group summaries, mean difference, standard error, degrees of freedom and test statistic as well as the interval. The existing probability routine then uses the refined statistic and degrees of freedom. If the bounded refinement does not converge, the kernel refuses the calculation instead of silently returning the inaccurate fallback.
The mathematical method, confidence-level interface, registered tolerances and supported scientific scope are unchanged. These finite regressions do not prove correctly rounded answers for every input or provide a certified numerical error enclosure. They do show how a concrete precision defect can be repaired without weakening the comparison rules.
Inspect and reproduce
The fixed repair record gives the source, conditions, affected fields and reproduction commands. The recorded local run used Node 24.19.0; the repair-head CI passed all seven jobs, including cross-platform Node 20/22 tests and package checks.
Implementation and self-review used OpenAI Codex, followed by founder-supplied review findings and repairs. Independent numerical reference calculations are not independent scientific review. The public source lets developers inspect the narrower engineering result: preserving a small answer requires checking the precision of the whole calculation that produces it.
Use the current verifier documentation for the published package. The source repair described here does not change the installed release or announce a new supported method.