pub(super) fn prefer_spectral_sw1d<const N: usize>(
ewald: Result<Jet<N>>,
rounding: Rounding<N>,
series: impl FnOnce() -> Option<(Jet<N>, Rounding<N>)>,
k: Complex,
) -> Result<Jet<N>>Expand description
A 1D spherical Ewald sum ewald with the rounding bounds rounding of its components
(the value’s with the predicted loss of the cancellation of its parts), completed
from the spectral series: each component whose bound exceeds SPECTRAL_SWITCH_LOSS
comes from the series where that bounds it more tightly, and a failed sum is replaced
by the series. The choice of the value reads only values and value bounds, as in
value-only evaluations. Fails where the value’s bound still exceeds MAX_LOSS.