Unreachable branches and double-counted samples: two silent failure modes in threshold scattering and periodic-orbit spectra

Two arithmetic mistakes are reported that share an uncomfortable property: neither raises an exception, produces a NaN, nor returns an implausible number. Each returns a finite, smooth, plausible value of roughly the right size, and each survives the checks a careful person is most likely to apply. In the first, a physically correct branch is guarded by a test for a transcendental function being exactly zero. Because cos(pi/2) evaluates to 6.123234e-17 in IEEE-754 binary64, the guard never fires, and the zero-energy phase shift of an s-wave square well that supports a half-bound state is returned as n*pi instead of (n+1/2)*pi - an error of exactly pi/2 that still satisfies the naive statement of Levinson's theorem. The remedy is to ask not whether the cosine is zero but whether it vanishes to the accuracy with which its own argument is known, |cos x| <= 8*eps*max(1,x). Across 2,000,000 random well strengths this detector fires on the marginal family and nowhere else, and its capture width matches the predicted noise floor to within 5 percent over a fortyfold range. A 60-digit reference confirms the limit and gives the approach law delta(E) = (n+1/2)*pi - (a/2)*sqrt(E) + O(E), whose square-root, non-analytic behaviour makes extrapolation from a small finite energy a poor substitute for the analytic branch value. In the second, one period of a periodic orbit is sampled on a grid that keeps its closing point, so a single phase of the motion is counted twice. The resulting bias is derived in closed form, (A_sampled - A)/A = (f(0)/A - 1)/N, and confirmed to nine digits: for an orbit started at the origin the time-averaged mean square displacement is wrong by exactly -1/N regardless of the integrator, the well, or the energy, turning a result good to 1e-13 into one good to 1e-3. Tightening the ODE tolerance by eight orders of magnitude does not move it, because it is a counting error and not an accuracy error. The same defect shifts the third Fourier line by 3.5 percent, and raises the symmetry-forbidden even harmonics from 1e-14 to 1.5e-3, which makes them a diagnostic that costs nothing. The phase-shift branch on which the first result rests is itself validated against four references it was not built from: the matching condition it solves (residual 1.2e-14), a reference fixed by continuity alone with no branch arithmetic (2.8e-14), the textbook s-wave scattering length a_s = a(1 - tan(sqrt(V0)a)/(sqrt(V0)a)) across five wells (8.0e-13), and continuity over 200,000 samples spanning thirteen decades in energy. That third check also disposes of a natural misreading: at finite energy the phase shift is not n*pi, and near a resonance the approach to it is slow, so evaluating at a small but finite energy and expecting a clean multiple of pi suggests a defect where there is none. Both defects are examined analytically, and every table in the note is reproducible from the closed-form results stated in the text: the detector, the bias formula, the turning-point quadrature and the integrator settings are all given explicitly.

Authors

Publication Details

Journal
Zenodo (CERN European Organization for Nuclear Research)
Published
2026-09-06
DOI
https://doi.org/10.5281/zenodo.22549780
Primary Topic
Particle physics theoretical and experimental studies
Type
preprint
Controls
|||
ALL TIME
JAN
FEB
MAR
APR
MAY
JUN
JUL
AUG
SEP
OCT
preprint

Unreachable branches and double-counted samples: two silent failure modes in threshold scattering and periodic-orbit spectra

Prashant Saini, Akash Sharma
Zenodo (CERN European Organization for Nuclear Research)
Particle physics theoretical and experimental studies
preprint

Unreachable branches and double-counted samples: two silent failure modes in threshold scattering and periodic-orbit spectra

Prashant Saini, Akash Sharma
preprint en

Abstract

Two arithmetic mistakes are reported that share an uncomfortable property: neither raises an exception, produces a NaN, nor returns an implausible number. Each returns a finite, smooth, plausible value of roughly the right size, and each survives the checks a careful person is most likely to apply. In the first, a physically correct branch is guarded by a test for a transcendental function being exactly zero. Because cos(pi/2) evaluates to 6.123234e-17 in IEEE-754 binary64, the guard never fires, and the zero-energy phase shift of an s-wave square well that supports a half-bound state is returned as n*pi instead of (n+1/2)*pi - an error of exactly pi/2 that still satisfies the naive statement of Levinson's theorem. The remedy is to ask not whether the cosine is zero but whether it vanishes to the accuracy with which its own argument is known, |cos x| <= 8*eps*max(1,x). Across 2,000,000 random well strengths this detector fires on the marginal family and nowhere else, and its capture width matches the predicted noise floor to within 5 percent over a fortyfold range. A 60-digit reference confirms the limit and gives the approach law delta(E) = (n+1/2)*pi - (a/2)*sqrt(E) + O(E), whose square-root, non-analytic behaviour makes extrapolation from a small finite energy a poor substitute for the analytic branch value. In the second, one period of a periodic orbit is sampled on a grid that keeps its closing point, so a single phase of the motion is counted twice. The resulting bias is derived in closed form, (A_sampled - A)/A = (f(0)/A - 1)/N, and confirmed to nine digits: for an orbit started at the origin the time-averaged mean square displacement is wrong by exactly -1/N regardless of the integrator, the well, or the energy, turning a result good to 1e-13 into one good to 1e-3. Tightening the ODE tolerance by eight orders of magnitude does not move it, because it is a counting error and not an accuracy error. The same defect shifts the third Fourier line by 3.5 percent, and raises the symmetry-forbidden even harmonics from 1e-14 to 1.5e-3, which makes them a diagnostic that costs nothing. The phase-shift branch on which the first result rests is itself validated against four references it was not built from: the matching condition it solves (residual 1.2e-14), a reference fixed by continuity alone with no branch arithmetic (2.8e-14), the textbook s-wave scattering length a_s = a(1 - tan(sqrt(V0)a)/(sqrt(V0)a)) across five wells (8.0e-13), and continuity over 200,000 samples spanning thirteen decades in energy. That third check also disposes of a natural misreading: at finite energy the phase shift is not n*pi, and near a resonance the approach to it is slow, so evaluating at a small but finite energy and expecting a clean multiple of pi suggests a defect where there is none. Both defects are examined analytically, and every table in the note is reproducible from the closed-form results stated in the text: the detector, the bias formula, the turning-point quadrature and the integrator settings are all given explicitly.

Zenodo (CERN European Organization for Nuclear Research)
Particle physics theoretical and experimental studies
AI Navigator

Ask Laika to Summarize, Analyze, and Connect papers live on the map.

Summarize Papers & Methodologies

Extract key findings, datasets, and comparative methods across publications.

Benchmark Rankings & Visual Analytics

Rank top research institutions, authors, funders, topics, and journals by Field-Weighted Citation Impact (FWCI) and paper volume with instant charts.

Connect Distant Disciplines

Bridge topological clusters on the map to find hidden collaborative intersections.