Module accuracy

Module accuracy 

Source
Expand description

Rounding-error bounds, and the failure of sums whose Ewald parts cancel.

treams-rs extension: treams returns the sum of its parts without a bound.

Structsยง

Checked ๐Ÿ”’
The components of a sum that cancellation checks: the value unless the sum vanishes by symmetry (vanishes), which returns it as an exact zero, and each derivative that such a sum does not return as zero either, with the scale s of its slot (derivative_scale).
Rounding ๐Ÿ”’
First-order bounds on the absolute rounding errors of a jetโ€™s value and of each of its derivatives, in units of epsilon.

Constantsยง

AUTOMATIC_GROWTH ๐Ÿ”’
The largest Re(1 / (2 eta^2)) of the automatic split (resolve_split): 16 / pi from |k L| = 8 on, with a relative margin of 1e-12 for its rounding.
EARLY_FAILURE_LOSS ๐Ÿ”’
The loss beyond which a complete sum below every automatic split fails early, while its real-space terms still add up.
MAX_LOSS ๐Ÿ”’
Largest rounding error bound of a 1D spherical sum relative to max(|S|, 1), and largest loss of any sum to the cancellation of its Ewald parts relative to the scale of a component, before it fails.
TERM_ULPS ๐Ÿ”’
Relative rounding error of every Ewald term and of the self term, in ulps, that cancellation counts.

Functionsยง

below_automatic ๐Ÿ”’
Whether the split eta lies below every automatic one (AUTOMATIC_GROWTH).
cancellation ๐Ÿ”’
The predicted absolute rounding errors, in units of epsilon, of the value and derivatives of sum (phase times the Ewald parts and the self term other), or a failure where they cancel beyond use: where the error of a checked component plus the truncation tail of parts that did not converge to the complete sum (Shells::tail) exceeds MAX_LOSS of its scale, max(|S|, 1) for the value and |dS| + max(|S|, 1) s for a derivative (S = 0 for a sum that vanishes by symmetry). Each component predicts the bounds of the real-space Kambe integrals (SmallSplitKambe) plus TERM_ULPS times the moduli of the terms and of the self term, and an ulp of each compensated part (Shells).
derivative_scale ๐Ÿ”’
The scale s of the derivative in jet slot slot of a sum with dim lattice dimensions and the wavenumber k, on which it counts |dS| + max(|S|, 1) s: 1 / |k| for the wavenumber and the Bloch vector, |k| for the shift and the lattice vectors.
too_small ๐Ÿ”’
The failure of a sum whose cancelling Ewald parts lose loss of max(|S|, 1), or of a derivative on its scale |dS| + max(|S|, 1) s.