# Ewald lattice sums against high-precision references, one sum per line:
# `wave dim re(k) im(k) x y z re(eta) im(eta) rows bloch part jet tolerance: re im [dk dq]`.
# The wave is `s l m` (spherical) or `c m` (cylindrical); `rows` are the `dim x dim`
# lattice rows and `bloch` the Bloch vector in the lattice frame of lattice::sum;
# `eta = 0` selects the automatic split. The sum `part` (full, real or reciprocal) and,
# with `jet` 1, the value of the jet are within `tolerance * max(|S|, 1)` of `re im`, and
# the jet's `k` and first Bloch derivatives within that of `dk` and `dq` (re im pairs)
# where given. Read by `sums_match_high_precision_references`; see references/README.md.
#
# 2D spherical and 1D cylindrical sums off the lattice plane or axis (`|k s eta|^2` of 0.3
# to 6): image sums in mpmath at 30 digits, absolutely convergent for Im k >= 0.7, at the
# automatic, real and rotated splits (the reciprocal parts pass from their series in
# `t` to the Kambe chain there). At `|t|` of 20 the larger splits of the first sum lose
# 6e-13 to the parts' cancellation.
s 12 1 2 2.3 0.9 0.35 -0.55 2.0 0.0 0.0 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -1.8024215427540946 -8.228577635696524
s 12 1 2 2.3 0.9 0.35 -0.55 2.0 0.5 0.0 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -1.8024215427540946 -8.228577635696524
s 12 1 2 2.3 0.9 0.35 -0.55 2.0 0.6354176956084364 -0.4860497424211482 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -1.8024215427540946 -8.228577635696524
s 12 -1 2 2.3 0.9 0.35 -0.55 1.05 0.0 0.0 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -1434.510591198058 -5377.055217898743
s 12 -1 2 2.3 0.9 0.35 -0.55 1.05 0.5 0.0 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -1434.510591198058 -5377.055217898743
s 12 -1 2 2.3 0.9 0.35 -0.55 1.05 0.9 0.0 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -1434.510591198058 -5377.055217898743
s 12 -1 2 2.3 0.9 0.35 -0.55 1.05 0.7965438049097292 -0.07428301865117759 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -1434.510591198058 -5377.055217898743
s 12 -1 2 2.3 0.9 0.35 -0.55 1.05 1.1820898787642755 -0.20655149121480681 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -1434.510591198058 -5377.055217898743
s 12 -1 2 2.3 0.9 0.35 -0.55 1.05 0.6354176956084364 -0.4860497424211482 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -1434.510591198058 -5377.055217898743
s 12 -2 2 4.1 1.0 0.3 -0.2 0.45 0.0 0.0 1.0 0.0 0.5 0.8660254037844386 0.9 0.2 full 1 2.5e-13: 9880.346176505276 1041.3282917546508
s 12 -2 2 4.1 1.0 0.3 -0.2 0.45 0.5 0.0 1.0 0.0 0.5 0.8660254037844386 0.9 0.2 full 1 2.5e-13: 9880.346176505276 1041.3282917546508
s 12 -2 2 4.1 1.0 0.3 -0.2 0.45 0.9 0.0 1.0 0.0 0.5 0.8660254037844386 0.9 0.2 full 1 2.5e-13: 9880.346176505276 1041.3282917546508
s 12 -2 2 4.1 1.0 0.3 -0.2 0.45 0.7993352671000079 0.03260568616297985 1.0 0.0 0.5 0.8660254037844386 0.9 0.2 full 1 2.5e-13: 9880.346176505276 1041.3282917546508
s 12 -2 2 4.1 1.0 0.3 -0.2 0.45 1.199076647376776 -0.04706584446995704 1.0 0.0 0.5 0.8660254037844386 0.9 0.2 full 1 2.5e-13: 9880.346176505276 1041.3282917546508
s 12 -2 2 4.1 1.0 0.3 -0.2 0.45 0.6945605809272707 -0.39697052714524295 1.0 0.0 0.5 0.8660254037844386 0.9 0.2 full 1 2.5e-13: 9880.346176505276 1041.3282917546508
s 9 0 2 2.3 0.9 0.35 -0.55 1.0 0.0 0.0 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -10.843325945106484 7.733266350731947
s 9 0 2 2.3 0.9 0.35 -0.55 1.0 0.5 0.0 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -10.843325945106484 7.733266350731947
s 9 0 2 2.3 0.9 0.35 -0.55 1.0 0.9 0.0 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -10.843325945106484 7.733266350731947
s 9 0 2 2.3 0.9 0.35 -0.55 1.0 0.7965438049097292 -0.07428301865117759 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -10.843325945106484 7.733266350731947
s 9 0 2 2.3 0.9 0.35 -0.55 1.0 1.1820898787642755 -0.20655149121480681 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -10.843325945106484 7.733266350731947
s 9 0 2 2.3 0.9 0.35 -0.55 1.0 0.6354176956084364 -0.4860497424211482 1.4 0.0 0.5 1.6 0.4 -0.7 full 1 2.5e-13: -10.843325945106484 7.733266350731947
c 11 1 2.2 0.7 0.4 0.9 0.0 0.0 0.0 1.3 -0.3 full 1 2.5e-13: -1447.2492409861197 -322489.8253745796
c 11 1 2.2 0.7 0.4 0.9 0.0 0.5 0.0 1.3 -0.3 full 1 2.5e-13: -1447.2492409861197 -322489.8253745796
c 11 1 2.2 0.7 0.4 0.9 0.0 0.5995656481730008 -0.022826158916674194 1.3 -0.3 full 1 2.5e-13: -1447.2492409861197 -322489.8253745796
c 11 1 2.2 0.7 0.4 0.9 0.0 0.5025169116352551 -0.327836473749589 1.3 -0.3 full 1 2.5e-13: -1447.2492409861197 -322489.8253745796
c 11 1 2.2 0.7 0.4 0.9 0.0 0.8947511782561076 -0.09705837938739262 1.3 -0.3 full 1 2.5e-13: -1447.2492409861197 -322489.8253745796
c -9 1 -2.2 0.7 0.4 -1.4 0.0 0.0 0.0 1.3 0.5 full 1 2.5e-13: -200.6720195963184 -47.18890961721253
c -9 1 -2.2 0.7 0.4 -1.4 0.0 0.5 0.0 1.3 0.5 full 1 2.5e-13: -200.6720195963184 -47.18890961721253
c -9 1 -2.2 0.7 0.4 -1.4 0.0 -0.5025169116352551 -0.327836473749589 1.3 0.5 full 1 2.5e-13: -200.6720195963184 -47.18890961721253
c -9 1 -2.2 0.7 0.4 -1.4 0.0 -0.5995656481730008 -0.022826158916674194 1.3 0.5 full 1 2.5e-13: -200.6720195963184 -47.18890961721253
c -9 1 -2.2 0.7 0.4 -1.4 0.0 -0.7863240964216206 -0.4378292080100663 1.3 0.5 full 1 2.5e-13: -200.6720195963184 -47.18890961721253
# 1D cylindrical sums of order +-8 at |k| a = 10.2, 1.1 periods off the axis: spectral
# sums in mpmath at 40 digits; 0.6 times the automatic split costs e^(1 / (2 eta^2)) =
# 1.4e6 ulps. Reciprocal parts of order +-5 at half the automatic split, where each
# diffraction order takes the single Kambe integrals or their chain, whichever bounds
# the sum more tightly: extended-precision spectral sums less the real part.
c 8 1 11.3 0.0 0.2 0.99 0.0 0.0 0.0 0.9 0.1 full 1 2e-14: 0.3644218938097506 -0.3740015029384894
c 8 1 11.3 0.0 0.2 0.99 0.0 0.18799712059732498 0.0 0.9 0.1 full 1 1e-10: 0.3644218938097506 -0.3740015029384894
c -8 1 11.3 0.0 0.2 0.99 0.0 0.0 0.0 0.9 0.1 full 1 2e-14: -0.29297447637671004 0.1166886848889117
c -8 1 11.3 0.0 0.2 0.99 0.0 0.18799712059732498 0.0 0.9 0.1 full 1 1e-10: -0.29297447637671004 0.1166886848889117
c -5 1 6.9 0.8 0.45 0.9 0.0 0.18043105133514184 0.0 1.0 -1.2 reciprocal 0 3e-14: -292.0664585000277 -121.18346526065787
c 5 1 6.9 0.8 0.45 0.9 0.0 0.18043105133514184 0.0 1.0 -1.2 reciprocal 0 1.6e-13: 50.69772632256105 34.912374942889
# 2D spherical sums next to the diffraction threshold of the zeroth order (k_q = 2e-3
# at k = 2.1), which takes `q . q - k^2` from compensated products: spectral sums in
# mpmath at 30 digits, derivatives from its numerical derivatives.
s 0 0 2 2.1 0.0 0.13 0.27 0.5 0.0 0.0 1.0 0.0 0.0 1.0 2.099999047618832 0.0 full 1 1e-14: 406.51643834186103 -113.40833161624529 -213351988.25379637 59736525.54948739 213351683.200716 -59736497.344665565
s 0 0 2 2.1 0.0 0.13 0.27 0.5 0.8 0.0 1.0 0.0 0.0 1.0 2.099999047618832 0.0 full 1 1e-14: 406.51643834186103 -113.40833161624529 -213351988.25379637 59736525.54948739 213351683.200716 -59736497.344665565
s 2 -1 2 2.1 0.0 0.13 0.27 0.5 0.0 0.0 1.0 0.0 0.0 1.0 2.099999047618832 0.0 full 1 1e-14: 0.3521482622081108 -0.5481088610804048 154.59127929794812 557.3417192736774 -154.92942910896016 -556.9125217465713
s 2 -1 2 2.1 0.0 0.13 0.27 0.5 0.8 0.0 1.0 0.0 0.0 1.0 2.099999047618832 0.0 full 1 1e-14: 0.3521482622081108 -0.5481088610804048 154.59127929794812 557.3417192736774 -154.92942910896016 -556.9125217465713
s 5 3 2 2.1 0.0 0.13 0.27 0.5 0.0 0.0 1.0 0.0 0.0 1.0 2.099999047618832 0.0 full 1 1e-14: -146.45978632869617 -417.49333207442567 73257918.99136432 261644037.46682236 -73257862.67930166 -261643889.1176761
s 5 3 2 2.1 0.0 0.13 0.27 0.5 0.8 0.0 1.0 0.0 0.0 1.0 2.099999047618832 0.0 full 1 1e-14: -146.45978632869617 -417.49333207442567 73257918.99136432 261644037.46682236 -73257862.67930166 -261643889.1176761
# Next to the thresholds of orders whose `q` carries the rounding of its reciprocal
# vector (k_q = 4.5e-3 k propagating, 1.4e-3 i k evanescent), which keep the rounded
# `q . q / k^2 - 1`: Weyl sums at 30 digits with exact reciprocal vectors.
s 0 0 2 6.303111309241046 0.0 0.13 0.27 0.3 0.0 0.0 1.0 0.0 0.0 1.0 0.5 0.0 full 0 2e-13: -2.54098585569074 0.26871972294302976
s 0 0 2 6.303111309241046 0.0 0.13 0.27 0.3 0.9 0.0 1.0 0.0 0.0 1.0 0.5 0.0 full 0 2e-13: -2.54098585569074 0.26871972294302976
s 0 0 2 3.6954825016513464 0.0 0.221 0.459 0.51 0.0 0.0 1.7 0.0 0.0 1.7 -0.219 0.007 full 0 1e-12: 30.93981368458616 5.4068716556830845
s 0 0 2 3.6954825016513464 0.0 0.221 0.459 0.51 0.9 0.0 1.7 0.0 0.0 1.7 -0.219 0.007 full 0 1e-12: 30.93981368458616 5.4068716556830845
# Splits below every automatic one whose parts do not cancel: a real-space part against
# its erfc sum in mpmath at 40 digits; 1D spherical sums on the lattice axis (no spectral
# series) against Lerch-transcendent sums at 40 digits (60 for the real parts), whose
# real-space Kambe integrals take their series with double-double coefficients.
s 0 0 2 2.0 0.0 0.31 0.17 0.22 0.13 0.0 1.0 0.0 0.0 1.0 0.3 -0.2 real 0 1e-13: -7689855444.561904 -130185264027.0539
s 0 0 2 1.0 0.0 0.31 0.17 0.22 0.13 0.0 1.0 0.0 0.0 1.0 0.3 -0.2 real 0 1e-13: -1917924772.913553 -32469471597.593548
s 0 0 1 0.34 0.0 0.0 0.0 0.1 0.0 0.0 1.0 0.25 full 0 1e-15: 2.503032083509468 -10.824290488894055
s 0 0 1 0.34 0.0 0.0 0.0 0.1 0.1383 0.0 1.0 0.25 full 0 1e-6: 2.503032083509468 -10.824290488894055
s 0 0 1 0.38 0.0 0.0 0.0 0.1 0.0 0.0 1.0 0.0 full 0 1e-15: 2.332176119612521 -8.882248136229464
s 0 0 1 0.38 0.0 0.0 0.0 0.1 0.137 0.0 1.0 0.0 full 0 1e-5: 2.332176119612521 -8.882248136229464
s 0 0 1 0.42 0.0 0.0 0.0 0.1 0.0 0.0 1.0 0.1 full 0 1e-15: 2.0844134030611885 -7.963405021028666
s 0 0 1 0.42 0.0 0.0 0.0 0.1 0.2 0.0 1.0 0.1 full 0 1e-11: 2.0844134030611885 -7.963405021028666
s 0 0 1 0.3 0.0 0.0 0.0 0.5 0.0 0.0 1.0 0.0 full 0 1e-15: 2.9540897515091933 -4.867808357486853
s 0 0 1 0.3 0.0 0.0 0.0 0.5 0.14 0.0 1.0 0.0 full 0 1e-5: 2.9540897515091933 -4.867808357486853
s 5 0 1 0.42 0.0 0.0 0.0 0.5 0.137 0.0 1.0 0.1 full 0 1e-12: -1036456.5708193515 51863.7146443787
s 7 0 1 0.42 0.0 0.0 0.0 0.5 0.137 0.0 1.0 0.1 full 0 1e-12: -3905475144.4639015 195436645.89815375
s 5 0 1 0.42 0.0 0.0 0.0 0.5 0.137 0.0 1.0 -0.15 full 0 1e-12: 1551405.5233462485 116576.29597855227
s 7 0 1 0.42 0.0 0.0 0.0 0.5 0.137 0.0 1.0 -0.15 full 0 1e-12: 5845995082.337058 439273579.1164239
s 5 0 1 0.42 0.0 0.0 0.0 0.5 0.137 0.0 1.0 0.25 full 0 1e-12: -2568237.859586675 322713.2724086823
s 7 0 1 0.42 0.0 0.0 0.0 0.5 0.137 0.0 1.0 0.25 full 0 1e-12: -9678336183.322536 1216132657.5990527
s 5 0 1 0.42 0.0 0.0 0.0 0.5 0.137 0.0 1.0 0.1 real 0 1e-12: 2786847.240325727 -139458.5968875551
s 7 0 1 0.42 0.0 0.0 0.0 0.5 0.137 0.0 1.0 0.1 real 0 1e-12: -3904725419.6259537 195399130.7354753
