← Session 8 — Regroup + R-004 finite-height Li theorem; resources atlas ingested
thinking (16052 chars)
THERE IT IS!!! The module's GAMMA_E is a **float** 0.5772156649015329 (53-bit double!), NOT the 50-digit string!!
Looking back at the original script (line 55): GAMMA_E = 0.57721566490153286060651209008240243104215933593992 — written WITHOUT QUOTES! It's a Python float literal → truncated to double precision at import!! I read it as a string in my head, but it's a bare float. So mp.mpf(GAMMA_E) converts the DOUBLE 0.5772156649015329 — error ~2.2e-17/2... wait: double γ: 0.57721566490153286|06... double rounds at digit 16: 0.5772156649015329 (rounded up at digit 16: ...3286 → ...329): error = 0.5772156649015329 − 0.5772156649015328606 = +3.9e-17?? Then τ_0 error = 2e-17, σ_1 error 2e-17. But measured σ_1 error 2.47e-21?! Hmm — mp.mpf(0.5772156649015329) — the double's EXACT binary value = 0.57721566490153286060651209008240243104215933593992?? NO — the double nearest to γ is 0.57721566490153286060651209008240243104215933593992??? Actually the float repr printed "0.5772156649015329" — that's just repr truncation. The double's exact value ≈ γ + δ with |δ| ≤ 2^{-54} ≈ 5.6e-17. So σ_1 error ~2.8e-17. Measured 2.47e-21?!?! 2.47e-21 ≪ 5.6e-17. DOESN'T MATCH!!
Hmm!! So GAMMA_E-as-float explains a 2.8e-17-level error, but measured is 2.47e-21. WAIT — but the DEBUG tau0 = -1.554119955935411829263659418391229689523 vs correct -1.55411995593541182679220184217590713942: diff = 2.47e-21. If τ_0 = −0.5·(log4π + GAMMA_E_double): error = δ/2 ≤ 2.8e-17. Measured 2.47e-21?! Inconsistent with float-γ!! UNLESS the double γ is suspiciously close: double(γ) = ?: γ = 0.577215664901532860606512090082402... 2^-53 = 1.11e-16: double error ≤ 5.5e-17. τ diff 2.47e-21 — 20x smaller than the max double error. Possible if double(γ) happens to be within 5e-21?? No — doubles are spaced 1.1e-16 apart near 0.577; the nearest double to γ is at most 5.5e-17 away, but could be closer... γ in binary: the double is uniquely determined; its distance to γ is some fixed value. Measured: 2·2.47e-21 = 4.94e-21 away?? That would be a lucky coincidence — 4 orders luckier than worst-case. Let me just compute float(γ) − γ exactly... float repr 0.5772156649015329: as exact decimal the double is 0.57721566490153286060651209008240243104215933593992?? No. Let me compute in Python: (0.5772156649015329).hex() and exact difference. If float-γ diff is 4.94e-21 — then GAMMA_E float explains everything!
Actually wait — γ's double: γ ≈ 0.5772156649015328606065120900824. Doubles near: mantissa 52 bits: 0.57721566490153286060651209008240243104215933593992 might BE the correctly-rounded double's decimal expansion to 50 digits!!! Doubles have ~15.95 sig digits, so a 50-digit decimal of the double would show random digits after digit 16-17. The given GAMMA_E string matches γ to digit 50 ("...593992" = γ's digits). A double can't. So GAMMA_E as written IS γ to 50 digits — as a FLOAT LITERAL Python parses it to the nearest double = double(γ). So mp.mpf(GAMMA_E) = double(γ) exactly. And double(γ) − γ = ? Compute: 0.5772156649015329 (repr) — the double. Its exact value: 0.5772156649015328606065120900824024310421...? If the double's exact decimal expansion matches γ to ~20 digits: distance ~4.94e-21?? Impossible — double spacing 1.1e-16 means the double is within 5.5e-17 but its distance is generically ~1e-17, and 4.9e-21 would mean γ is freakishly close to a double — measure-zero luck... Actually γ's double: 0x3FE279A74590331D or whatever — its exact distance from γ is some specific number. It COULD be small by coincidence (1-in-10^4 luck for 4 orders). Hmm, but actually we measured τ0 error = 2.47e-21 → GAMMA_E error = 4.94e-21. Hmm, and 4.94e-21... wait — earlier "GAMMA_E − euler = −3.5988e-51" — that was mp.mpf("0.5772...50-digit-STRING") − mp.euler — the string version. Fine.
So: double(γ) is within 4.94e-21 of γ?! That's... actually let me verify: γ to more digits: 0.57721566490153286060651209008240243104215933593992337... The double nearest: hmm, whatever — the DEBUG output directly shows tau0 error 2.47e-21 = (log4π+GAMMA_E) error/2 → GAMMA_E error 4.94e-21. Since GAMMA_E = float literal, and float(0.57721566490153286060651209008240243104215933593992) = some double, its error vs the literal = 4.94e-21?? Python's float() correctly rounds to nearest double. The nearest double to γ must then be at distance 4.94e-21. Hmm — that would mean γ is within 4.94e-21 of a double — a 10^-4-ish coincidence. FINE, coincidences happen (it's actually because 0.5772156649015329's... whatever).
Wait, no — actually not needed: the double 0.5772156649015329 in hex... let me just accept: GAMMA_E is a float literal → double → error 4.94e-21 (as measured).
THE FIX: make GAMMA_E a STRING (or use mp.euler where needed). Original line: GAMMA_E = 0.57721566490153286060651209008240243104215933593992 — bare number → float. Quote it: GAMMA_E = "0.57721566490153286060651209008240243104215933593992".
Where is GAMMA_E used? get_zeta_strings (zeta_str[1] = nstr(log4π+mp.mpf(GAMMA_E), full_digits)) — the CACHE already built has ζ*(1) with double-γ!!! The cache zeta_str[1] error ~4.9e-21!!! That affects S_∞ via the j=1 term: −n/2·ζ*(1): error n·2.5e-21 → at n=5000: 1.2e-17 — S_∞ error 1.2e-17 — λ error 1.2e-17, negligible for the curve but would cap V1 at ~1e-21 rel. AND it affects... S_f? No, S_f doesn't use zeta_str[1] (η from Stieltjes/flint). τ_0 uses GAMMA_E (σ_1 → only the σ_1 print/check; σ_1 isn't used in η_j for j ≥ 24! σ_m used: m ≥ 25 (zeros) and m ≤ 24 (exact) — wait, η_j for j ≥ 24 uses σ_{j+1}: j+1 ≥ 25 → only σ_25+ (zeros). The exact σ_m (m ≤ 24) are computed but NOT USED in η (they're only printed as checks)! Wait — then σ_2..24 are unused?! η_j for j ≥ 24 needs σ_{j+1} for j+1 = 25..: only σ_25..200 (zeros) are used. The exact σ_1..24 are pure diagnostics. Hmm — so the float-GAMMA_E only affects diagnostics?! Then why did S_f(300) dev = 7.8e-8?!
Hold on — GAMMA_E float also enters zeta_str[1] → S_∞ → λ. And τ[0] (σ_1, diagnostic only). Where else... τ_j for j=1..23 — diagnostic σ. So the dev at n=200-300 is NOT from GAMMA_E (except tiny 2.5e-21·n via S_∞ j=1 term: at n=300: 7.5e-19 — not 7.8e-8!).
So the growing dev (6.6e-15 at 200, 1.7e-12 at 250, 1.5e-10 at 300) is STILL unexplained!!! It grows ×~250 per 50. Hmm. But wait — is it maybe E-015's own error?! E-015's λ at n=200-300: E-015 used dps = 1450 total for n_max=3000 — its η-recursion at dps 1450, λ sums at dps 1450: cancellation in the η-sum ~ terms C(n,j)|η|: at n=300: 10^{37.5}: λ_300 accurate to ~1450−38−90(2^n) = ~1300 digits?? no way to be wrong at 7.8e-8.
Hmm, OR the comparison itself: e015 parsed from CSV — 26-digit strings: λ_300 = "519.7019656192496448446326" — 26 digits: error 2.6e-24·... rel 5e-27. no.
So the dev is in E-021's S_f or S_∞ content. S_f(300) = −2.48394345782 (unchanged across precision levels — computed at dps 173, 700: same). So η content. η_j for j ≤ 299: j ≤ 23 Stieltjes (validated 1e-245 stitch ✓), j ≥ 24: (1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}, σ_{j+1} from zeros for 25 ≤ j+1 ≤ 200, 0 for j+1 > 200 (j ≥ 200). At n=300: η_j for j = 200..299 have σ = 0 but true |σ_{j+1}| ~ 2·14^{−201} ≈ 0 — fine.
Hmm, so what about σ_m from zeros (25..200): computed at dps 100 with ρ = mpc(0.5, float(g)): r**(−m) for m up to 200 at dps 100: for the FIRST zero γ = 14.13: ρ^{−200}: |ρ|^{−200} = 14.13^{−200} = 10^{−229.3}: at dps 100 fine. σ_m accurate to ~1e-100·|σ_m| + float-γ effects (~1e-43) + zero-tails (~0). So σ_m (25..200) accurate to ~1e-43 absolute. S_f error: Σ_{j=24}^{n} C(n,j)·1e-43 — worst-case 2^n·1e-43: at n=300: 10^{90−43} = 10^{47}?!?! PHASELESS bound useless as always. With phases... the σ errors are ~1e-43·sign(σ)... Σ C(n,j)(−1)^{j+1}·(±1e-43) ~ (1−1)^n ~ cancellation... realistically ~C(n,100)·1e-43 ~ 10^{82}·1e-43 = 1e-39. Fine.
Hmm!! So none of my identified error sources explain 7.8e-8 at n=300. But empirically the dev exists and grows. Let me BISECT the sum: compute λ_300 with S_f split: terms j ≤ 100 vs j > 100; and compare S_f(300) partial sums against... a totally independent S_f(300): use η entirely from Stieltjes (k ≤ 300) — need flint stieltjes k ≤ 300 (~how long?). Alternatively: λ_300 from S_∞ + 1 − S_f where S_f uses η_j from the TAU+SIGMA formula for ALL j ≥ 1 with σ from... no, that's the same formula.
INDEPENDENT check of η_j at j ~ 100-300: η_j = (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}] — the formula itself is VALIDATED (diag1-3: matched Stieltjes at j ≤ 200 to 1e-102 — that was with σ from zeros m ≤ 16 + 0 beyond, and it matched to the σ-truncation level ~14^{−17} = 2e-20·C... hmm diag3's diffs at j=88-99 were 1e-102 absolute — with σ ZERO for j ≥ 17!!! and it matched to 1e-102 — because |σ_{j+1}| at j=88 is 14^{−89} = 10^{−102} — BELOW the comparison floor!! So the σ-omission was invisible in diag3!). OK.
So η_j formula + σ from zeros m ≤ 200 should be correct to ~1e-43 absolute for all j. S_f(300) error should be ~1e-39. But dev 7.8e-8!!! CONTRADICTION AGAIN.
Hmm... wait. Let me recheck the dev computation at n=300 more carefully. λ_E021(300) = S_inf[300] − S_f[300] + 1. S_inf[300] — computed by compute_S_inf at dps int(0.31·300)+80 = 173 from ζ strings parsed at dps 243. S_∞(300) = Σ(−1)^j C(300,j)(1−2^{−j})ζ*(j): terms up to C(300,150)·ζ ~ 10^{89}: error at dps 243-parse + 173-sum: 10^{89}·10^{−173} = 10^{−84} ✓. Result 516.2... accurate.
S_f(300) = −2.48394345782 (stable across dps 173/700).
λ = 516.2 + 2.4839 + 1 = 519.7. E-015: 519.7019656192496448446326. E-021 λ_300 = S_inf[300] − S_f[300] + 1: get the exact value: S_inf[300] = ? Let me print it. If S_inf[300] = 516.213... then λ = 519.697 vs E-015 519.702: diff 0.005?? earlier dev: 1.5e-10 rel → abs 7.8e-8. So E-021 λ_300 = 519.70197 ± ... — the diff 7.8e-8.
Hypothesis: E-015's λ_300 is slightly WRONG (its own η-recursion at dps 1450 for k up to 300 — recursion stable per my tests... E-015's gam strings at dps+10 = 1460 digits, recursion dps 1450 → η accurate to ~1e-1400 at k=300 per stability scaling... its λ sums at dps 1450 with terms C(300,j)η ~ 10^{37.5}: error 10^{37.5−1450} tiny). E-015 should be exact.
Let me just compute λ_300 from the ZERO side with a careful tail to adjudicate: zeros to T=5000 (7900) + tail correction ~ n²·(log(T/2π))/(2πT)·(1+...) — I estimated the pair term ~ n²/γ² for γ ≫ n... at n=300, T=5000: γ ranges 5000..∞: for γ ~ 5000-15000, γ/n ~ 16-50: expansion marginal. Tail real part ~ Σ_{γ>5000} 2Re[n/ρ − (n²−n)/(2ρ²) + (n³...)/...]: the full series: 1−(1−1/ρ)^n = −Σ_{k=1}^n C(n,k)(−1/ρ)^k: 2Re Σ_{γ>T}: Σ_k C(n,k)(−1)^{k+1}·2Re σ'_k(T) where σ'_k(T) = Σ_{γ>T}ρ^{−k}: 2Re σ'_1(T): conditionally small ~ S(T)/T·... ~0.001; 2Re σ'_2(T) ≈ −2Σ1/γ² ≈ −2(log(T/2π)+1)/(2πT)·... ≈ −2·7.68/31416 ≈ −4.9e-4; σ'_3(T) ≈ 2Σ Re ρ^{−3} ~ 2Σ(0.5³−3·0.5γ²)/γ⁶·... ≈ −3Σ1/γ⁴ ~ −3/(2πT³)·... ~0. So tail ≈ n·σ'_1 + C(n,2)·4.9e-4·... ≈ 300·(±0.001) + 44850·4.9e-4 = ±0.3 + 22!! Hmm sign: −C(n,2)·(−4.9e-4) = +21.97. So λ_300 = truncated + 22?? Earlier diag3 λ_200 truncated = 297.04 + tail(C(200,2)·4.9e-4 = 9.75) = 306.8 ✓✓ MATCHES E-015's 306.66 (within σ'_1 wobble ±0.3)!!! GREAT — so E-015's λ_200 is right, and the tail formula ~C(n,2)·4.9e-4 works.
λ_300: truncated Σ_{γ≤5000} + [300·σ'_1 + 44850·4.9e-4] = truncated + [±0.3 + 21.97]. Compute truncated now. If truncated + 21.97 ≈ 519.70 (E-015) → E-015 right → E-021's S_f or S_inf wrong by 7.8e-8·... wait E-021's λ_300 dev from E-015 is only 7.8e-8 — the zero-side can't resolve 7.8e-8 (σ'_1 wobble ±0.3). USELESS for the dev question.
Hmm OK so I can't easily adjudicate 7.8e-8. Let me think about what grows like ×250 per 50 n... e^{0.11n}: what in the pipeline scales like that? (1+1/9)^n? e^{0.105n} ≈ (10/9)^n?! Interesting: 9 = ? Hmm. C(n, j)·δ_j with δ_j ~ constant ε: dominated by j=n: C(n,n)=1: ε — no growth. With δ_j ~ ε·r^j: Σ C(n,j)εr^j = ε(1+r)^n: growth (1+r)^n: e^{0.11n} → r = 0.116 ≈ 1/8.6?? What has an error ~ε·(1/8.6)^j?? Hmm, 3^{−j}: (4/3)^n = e^{0.288n} too fast. (1/8)^j: (9/8)^n = e^{0.118n} CLOSE to observed e^{0.11n}!? What decays like 8^{−j}? NOTHING obvious. Hmm, (3/2)^j? (5/2)^n...
Actually, let me just measure the dev at n = 210, 220, ..., 300 to get the growth rate precisely, and also the ABS dev — and compare |dev_abs| vs C(n,j)·|σ-errors|...
WAIT. Actually — I wonder about σ_m for m=25..200 computed at dps 100 — sum(r**(−m) for r in rho): PYTHON BUILTIN sum at dps 100 ✓ fine. rho = [mp.mpc(0.5, float(g)) for g in zeros] at dps 60 (mp.mp.dps = 60 was set before rho)! mpc created at dps 60 — the mpc VALUES get rounded to 60 digits — fine (γ is float64 anyway).
Hmm, hmm. What about the ζ cache strings themselves for LARGE j? ζ(j) for j ~ 200-300 from the cache: built by flint.arb(j).zeta().str(1650) in the previous (buggy) session — flint, trustworthy ✓. S_∞ validated via V3 residual ✓.
η_j for j=24..299: (1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}: at dps 243 (smoke full_digits=193): ζ parsed at 243: (1−2^{−(j+1)})ζ(j+1) ~ 1 + 3^{−(j+1)}: subtract 1: result 3^{−(j+1)} + σ: absolute error ~1e-243·1 = 1e-243 ✓.
nstr(eta, full_digits=193): stores 193 sig digits ✓.
compute_Sf: parses at dps 243, sums at dps 173... at n=300 the sum needs: max term C(300,75)·η_74 ~ 10^{71}·10^{−35.4} = 10^{35.6}: guard = 173 − 35.6 = 137 digits ✓ fine.
So S_f(300) should be right to ~1e-100. λ_300 = S_inf[300] − S_f[300] + 1 → right to ~1e-84. E-015 right to ~1e-26 (CSV). Dev should be ~1e-26·rel = 5e-29. OBSERVED 1.5e-10!!! 19 orders of magnitude!!! WHAT?!
Unless E-015's λ_300 is wrong by 7.8e-8!!! E-015's η recursion: dps 1450 — stability: my tests at k ≤ 110, dps 1000 → 1e-597 at j=100. At k=300, dps 1450: loss? The recursion at k=300 from dps 1450: probably ~1e-1300. Then λ sums at dps 1450: terms ~10^{37.5}(n=300)... λ_300 accurate to ~10^{−1310}·10^{37.5} = 10^{−1272}. Can't be 7.8e-8 wrong.
Hmm, OR: E-015's λ_300 via a DIFFERENT formula path — let me check E-015's script... E-015 used E-011's machinery per the docs ("E-011/R-001: arithmetic side (BL Thm 2...)").
Wait wait wait. Actually — let me question S_∞(300)!!! S_inf[300] from compute_S_inf: Σ(−1)^j C(300,j)(1−2^{−j})ζ*(j). ζ*(1) from CACHE — cache zeta_str[1] = nstr(log(4π) + mp.mpf(GAMMA_E), 1650) — GAMMA_E IS THE DOUBLE!!! ζ*(1) error ~4.94e-21!!! j=1 term: (−1)·300·(1/2)·ζ*(1): error 300·0.5·4.94e-21 = 7.4e-19. Not 7.8e-8.
And ζ*(j) for j ≥ 2 from cache — flint ✓.
OK so WHAT produces 7.8e-8 at n=300, 7e-10 at n=250, 2e-12 at n=200?! Ratio per 50: ×350, ×350?! (7.8e-8/7e-10 = 111; 7e-10/2e-12 = 350; 2e-12/1.3e-15(150) = 1500). Ratios: 1500, 350, 111 — DECREASING×~3.2 each step. log-scale: error ~ C·a^n with a shrinking... error ~ e^{c·n^α}... or error ~ n^{k}: 200→300: (1.5)^k = 39 → k = 9.0; 250→300: (1.2)^k = 111 → k = 25.8. Not power. Error ~ b^{n}·n^k...
Hmm, actually — maybe look at it differently: errors 1.3e-15 (150), 2e-12 (200), 7e-10 (250), 7.8e-8 (300): log10: −14.9, −11.7, −9.15, −7.11. Deltas per 50: +3.2, +2.55, +2.04. Ratio of deltas: 0.80, 0.80!! GEOMETRIC in the log-increments → error ~ exp(c·n^α): Δlog10 error per Δn=50: d(n) = 3.2·0.8^{(n−150)/50}?? That converges: total log10 error → −14.9 + 3.2/(1−0.8) = +1.1?? error ~ 10^{1.1} at n → ∞??? That can't be — S_f/λ can't deviate that much... unless the error saturates. Fit: log10 err(n) = A − B·0.8^{n/50}: at n=150: A − B·0.216 = −14.9; n=200: A − B·0.1296 = −11.7; n=250: A − B·0.0778 = −9.15; n=300: A − B·0.0467 = −7.11. From first two: B·0.0864 = 3.2 → B = 37.04; A = −14.9 + 8.0 = −6.9. Check n=250: −6.9 − 37.04·0.0778 = −6.9−2.88 = −9.78?? observed −9.15. Meh, rough. n=300: −6.9 − 1.73 = −8.63 vs −7.11. Poor fit. Forget the law — find the MECHANISM.
BISECTION: λ_300 dev = (S_inf − S_f + 1) − λ_E015. Compute S_f(300) using η_j for j ≤ 23 from Stieltjes and j ≥ 24 = 0 (drop the tail entirely): S_f_partial: then dev_partial. The dropped terms' true contribution: Σ_{j=24}^{300} C(300,j)η_{j−1} ~ ~O(1) (since full S_f = −2.48 and partial will show). Then add back in blocks (24..100, 101..200, 201..300) to find which block carries the 7.8e-8.
Do it.
GAMMA_E is a bare float (53-bit) — that's one bug (affects ζ*(1) and σ₁ diagnostics, ~5e-21 level). But the growing 7.8e-8 dev at n=300 is still unexplained. Bisecting the S_f sum by j-blocks.
tool: Bash
input
{
"command": "cd /d/Python/Quantum && ./.venv/Scripts/python.exe - <<'EOF'\nsrc = open(\"research/numerics/scripts/E-021-sinf-sf-curve.py\").read()\nsrc = src.replace('if __name__ == \"__main__\":', 'if False:')\nns = {\"__file__\": \"research/numerics/scripts/E-021-sinf-sf-curve.py\"}\nexec(compile(src, \"e21\", \"exec\"), ns)\nimport numpy as np, mpmath as mp\nzs = np.load(\"research/numerics/data/E-021-zeros-cache.npy\")\nzeta_str, fd = ns[\"get_zeta_strings\"](300)\neta_str = ns[\"compute_eta\"](zeta_str, fd, zs)\nS_inf = ns[\"compute_S_inf\"](300, zeta_str, fd)\nmp.mp.dps = 100\ne015 = {}\nfor line in open(\"research/numerics/data/E-015-li-coefficients-n3000.csv\"):\n p = line.strip().split(\",\")\n if p[0].isdigit(): e015[int(p[0])] = mp.mpf(p[1])\nmp.mp.dps = 700\neta = {j: mp.mpf(v) for j, v in eta_str.items()}\nn = 300\n# cumulative S_f and dev as blocks are added\ns = mp.mpf(0); c = mp.mpf(1)\nfor j in range(1, n+1):\n c = c*(n-j+1)/j\n s += c*eta[j-1]\n if j in (23, 50, 100, 150, 200, 250, 300):\n mp.mp.dps = 100\n lam = S_inf[n] - s + 1\n dev = abs(lam - e015[n]) / abs(e015[n])\n print(f\"after j={j:>3}: S_f_partial = {mp.nstr(s,12):>18} \"\n f\"rel dev = {float(dev):.3e}\")\n mp.mp.dps = 700\nEOF",
"description": "Bisect S_f(300) dev by j-blocks",
"timeout": 600000
}
raw content_json (database row)
[{"type":"thinking","thinking":"THERE IT IS!!! The module's GAMMA_E is a **float** 0.5772156649015329 (53-bit double!), NOT the 50-digit string!! \n\nLooking back at the original script (line 55): GAMMA_E = 0.57721566490153286060651209008240243104215933593992 — written WITHOUT QUOTES! It's a Python float literal → truncated to double precision at import!! I read it as a string in my head, but it's a bare float. So mp.mpf(GAMMA_E) converts the DOUBLE 0.5772156649015329 — error ~2.2e-17/2... wait: double γ: 0.57721566490153286|06... double rounds at digit 16: 0.5772156649015329 (rounded up at digit 16: ...3286 → ...329): error = 0.5772156649015329 − 0.5772156649015328606 = +3.9e-17?? Then τ_0 error = 2e-17, σ_1 error 2e-17. But measured σ_1 error 2.47e-21?! Hmm — mp.mpf(0.5772156649015329) — the double's EXACT binary value = 0.57721566490153286060651209008240243104215933593992?? NO — the double nearest to γ is 0.57721566490153286060651209008240243104215933593992??? Actually the float repr printed \"0.5772156649015329\" — that's just repr truncation. The double's exact value ≈ γ + δ with |δ| ≤ 2^{-54} ≈ 5.6e-17. So σ_1 error ~2.8e-17. Measured 2.47e-21?!?! 2.47e-21 ≪ 5.6e-17. DOESN'T MATCH!!\n\nHmm!! So GAMMA_E-as-float explains a 2.8e-17-level error, but measured is 2.47e-21. WAIT — but the DEBUG tau0 = -1.554119955935411829263659418391229689523 vs correct -1.55411995593541182679220184217590713942: diff = 2.47e-21. If τ_0 = −0.5·(log4π + GAMMA_E_double): error = δ/2 ≤ 2.8e-17. Measured 2.47e-21?! Inconsistent with float-γ!! UNLESS the double γ is suspiciously close: double(γ) = ?: γ = 0.577215664901532860606512090082402... 2^-53 = 1.11e-16: double error ≤ 5.5e-17. τ diff 2.47e-21 — 20x smaller than the max double error. Possible if double(γ) happens to be within 5e-21?? No — doubles are spaced 1.1e-16 apart near 0.577; the nearest double to γ is at most 5.5e-17 away, but could be closer... γ in binary: the double is uniquely determined; its distance to γ is some fixed value. Measured: 2·2.47e-21 = 4.94e-21 away?? That would be a lucky coincidence — 4 orders luckier than worst-case. Let me just compute float(γ) − γ exactly... float repr 0.5772156649015329: as exact decimal the double is 0.57721566490153286060651209008240243104215933593992?? No. Let me compute in Python: (0.5772156649015329).hex() and exact difference. If float-γ diff is 4.94e-21 — then GAMMA_E float explains everything!\n\nActually wait — γ's double: γ ≈ 0.5772156649015328606065120900824. Doubles near: mantissa 52 bits: 0.57721566490153286060651209008240243104215933593992 might BE the correctly-rounded double's decimal expansion to 50 digits!!! Doubles have ~15.95 sig digits, so a 50-digit decimal of the double would show random digits after digit 16-17. The given GAMMA_E string matches γ to digit 50 (\"...593992\" = γ's digits). A double can't. So GAMMA_E as written IS γ to 50 digits — as a FLOAT LITERAL Python parses it to the nearest double = double(γ). So mp.mpf(GAMMA_E) = double(γ) exactly. And double(γ) − γ = ? Compute: 0.5772156649015329 (repr) — the double. Its exact value: 0.5772156649015328606065120900824024310421...? If the double's exact decimal expansion matches γ to ~20 digits: distance ~4.94e-21?? Impossible — double spacing 1.1e-16 means the double is within 5.5e-17 but its distance is generically ~1e-17, and 4.9e-21 would mean γ is freakishly close to a double — measure-zero luck... Actually γ's double: 0x3FE279A74590331D or whatever — its exact distance from γ is some specific number. It COULD be small by coincidence (1-in-10^4 luck for 4 orders). Hmm, but actually we measured τ0 error = 2.47e-21 → GAMMA_E error = 4.94e-21. Hmm, and 4.94e-21... wait — earlier \"GAMMA_E − euler = −3.5988e-51\" — that was mp.mpf(\"0.5772...50-digit-STRING\") − mp.euler — the string version. Fine.\n\nSo: double(γ) is within 4.94e-21 of γ?! That's... actually let me verify: γ to more digits: 0.57721566490153286060651209008240243104215933593992337... The double nearest: hmm, whatever — the DEBUG output directly shows tau0 error 2.47e-21 = (log4π+GAMMA_E) error/2 → GAMMA_E error 4.94e-21. Since GAMMA_E = float literal, and float(0.57721566490153286060651209008240243104215933593992) = some double, its error vs the literal = 4.94e-21?? Python's float() correctly rounds to nearest double. The nearest double to γ must then be at distance 4.94e-21. Hmm — that would mean γ is within 4.94e-21 of a double — a 10^-4-ish coincidence. FINE, coincidences happen (it's actually because 0.5772156649015329's... whatever).\n\nWait, no — actually not needed: the double 0.5772156649015329 in hex... let me just accept: GAMMA_E is a float literal → double → error 4.94e-21 (as measured). \n\nTHE FIX: make GAMMA_E a STRING (or use mp.euler where needed). Original line: GAMMA_E = 0.57721566490153286060651209008240243104215933593992 — bare number → float. Quote it: GAMMA_E = \"0.57721566490153286060651209008240243104215933593992\".\n\nWhere is GAMMA_E used? get_zeta_strings (zeta_str[1] = nstr(log4π+mp.mpf(GAMMA_E), full_digits)) — the CACHE already built has ζ*(1) with double-γ!!! The cache zeta_str[1] error ~4.9e-21!!! That affects S_∞ via the j=1 term: −n/2·ζ*(1): error n·2.5e-21 → at n=5000: 1.2e-17 — S_∞ error 1.2e-17 — λ error 1.2e-17, negligible for the curve but would cap V1 at ~1e-21 rel. AND it affects... S_f? No, S_f doesn't use zeta_str[1] (η from Stieltjes/flint). τ_0 uses GAMMA_E (σ_1 → only the σ_1 print/check; σ_1 isn't used in η_j for j ≥ 24! σ_m used: m ≥ 25 (zeros) and m ≤ 24 (exact) — wait, η_j for j ≥ 24 uses σ_{j+1}: j+1 ≥ 25 → only σ_25+ (zeros). The exact σ_m (m ≤ 24) are computed but NOT USED in η (they're only printed as checks)! Wait — then σ_2..24 are unused?! η_j for j ≥ 24 needs σ_{j+1} for j+1 = 25..: only σ_25..200 (zeros) are used. The exact σ_1..24 are pure diagnostics. Hmm — so the float-GAMMA_E only affects diagnostics?! Then why did S_f(300) dev = 7.8e-8?!\n\nHold on — GAMMA_E float also enters zeta_str[1] → S_∞ → λ. And τ[0] (σ_1, diagnostic only). Where else... τ_j for j=1..23 — diagnostic σ. So the dev at n=200-300 is NOT from GAMMA_E (except tiny 2.5e-21·n via S_∞ j=1 term: at n=300: 7.5e-19 — not 7.8e-8!).\n\nSo the growing dev (6.6e-15 at 200, 1.7e-12 at 250, 1.5e-10 at 300) is STILL unexplained!!! It grows ×~250 per 50. Hmm. But wait — is it maybe E-015's own error?! E-015's λ at n=200-300: E-015 used dps = 1450 total for n_max=3000 — its η-recursion at dps 1450, λ sums at dps 1450: cancellation in the η-sum ~ terms C(n,j)|η|: at n=300: 10^{37.5}: λ_300 accurate to ~1450−38−90(2^n) = ~1300 digits?? no way to be wrong at 7.8e-8.\n\nHmm, OR the comparison itself: e015 parsed from CSV — 26-digit strings: λ_300 = \"519.7019656192496448446326\" — 26 digits: error 2.6e-24·... rel 5e-27. no.\n\nSo the dev is in E-021's S_f or S_∞ content. S_f(300) = −2.48394345782 (unchanged across precision levels — computed at dps 173, 700: same). So η content. η_j for j ≤ 299: j ≤ 23 Stieltjes (validated 1e-245 stitch ✓), j ≥ 24: (1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}, σ_{j+1} from zeros for 25 ≤ j+1 ≤ 200, 0 for j+1 > 200 (j ≥ 200). At n=300: η_j for j = 200..299 have σ = 0 but true |σ_{j+1}| ~ 2·14^{−201} ≈ 0 — fine.\n\nHmm, so what about σ_m from zeros (25..200): computed at dps 100 with ρ = mpc(0.5, float(g)): r**(−m) for m up to 200 at dps 100: for the FIRST zero γ = 14.13: ρ^{−200}: |ρ|^{−200} = 14.13^{−200} = 10^{−229.3}: at dps 100 fine. σ_m accurate to ~1e-100·|σ_m| + float-γ effects (~1e-43) + zero-tails (~0). So σ_m (25..200) accurate to ~1e-43 absolute. S_f error: Σ_{j=24}^{n} C(n,j)·1e-43 — worst-case 2^n·1e-43: at n=300: 10^{90−43} = 10^{47}?!?! PHASELESS bound useless as always. With phases... the σ errors are ~1e-43·sign(σ)... Σ C(n,j)(−1)^{j+1}·(±1e-43) ~ (1−1)^n ~ cancellation... realistically ~C(n,100)·1e-43 ~ 10^{82}·1e-43 = 1e-39. Fine.\n\nHmm!! So none of my identified error sources explain 7.8e-8 at n=300. But empirically the dev exists and grows. Let me BISECT the sum: compute λ_300 with S_f split: terms j ≤ 100 vs j > 100; and compare S_f(300) partial sums against... a totally independent S_f(300): use η entirely from Stieltjes (k ≤ 300) — need flint stieltjes k ≤ 300 (~how long?). Alternatively: λ_300 from S_∞ + 1 − S_f where S_f uses η_j from the TAU+SIGMA formula for ALL j ≥ 1 with σ from... no, that's the same formula.\n\nINDEPENDENT check of η_j at j ~ 100-300: η_j = (−1)^{j+1}[(1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}] — the formula itself is VALIDATED (diag1-3: matched Stieltjes at j ≤ 200 to 1e-102 — that was with σ from zeros m ≤ 16 + 0 beyond, and it matched to the σ-truncation level ~14^{−17} = 2e-20·C... hmm diag3's diffs at j=88-99 were 1e-102 absolute — with σ ZERO for j ≥ 17!!! and it matched to 1e-102 — because |σ_{j+1}| at j=88 is 14^{−89} = 10^{−102} — BELOW the comparison floor!! So the σ-omission was invisible in diag3!). OK.\n\nSo η_j formula + σ from zeros m ≤ 200 should be correct to ~1e-43 absolute for all j. S_f(300) error should be ~1e-39. But dev 7.8e-8!!! CONTRADICTION AGAIN.\n\nHmm... wait. Let me recheck the dev computation at n=300 more carefully. λ_E021(300) = S_inf[300] − S_f[300] + 1. S_inf[300] — computed by compute_S_inf at dps int(0.31·300)+80 = 173 from ζ strings parsed at dps 243. S_∞(300) = Σ(−1)^j C(300,j)(1−2^{−j})ζ*(j): terms up to C(300,150)·ζ ~ 10^{89}: error at dps 243-parse + 173-sum: 10^{89}·10^{−173} = 10^{−84} ✓. Result 516.2... accurate.\n\nS_f(300) = −2.48394345782 (stable across dps 173/700).\n\nλ = 516.2 + 2.4839 + 1 = 519.7. E-015: 519.7019656192496448446326. E-021 λ_300 = S_inf[300] − S_f[300] + 1: get the exact value: S_inf[300] = ? Let me print it. If S_inf[300] = 516.213... then λ = 519.697 vs E-015 519.702: diff 0.005?? earlier dev: 1.5e-10 rel → abs 7.8e-8. So E-021 λ_300 = 519.70197 ± ... — the diff 7.8e-8. \n\nHypothesis: E-015's λ_300 is slightly WRONG (its own η-recursion at dps 1450 for k up to 300 — recursion stable per my tests... E-015's gam strings at dps+10 = 1460 digits, recursion dps 1450 → η accurate to ~1e-1400 at k=300 per stability scaling... its λ sums at dps 1450 with terms C(300,j)η ~ 10^{37.5}: error 10^{37.5−1450} tiny). E-015 should be exact.\n\nLet me just compute λ_300 from the ZERO side with a careful tail to adjudicate: zeros to T=5000 (7900) + tail correction ~ n²·(log(T/2π))/(2πT)·(1+...) — I estimated the pair term ~ n²/γ² for γ ≫ n... at n=300, T=5000: γ ranges 5000..∞: for γ ~ 5000-15000, γ/n ~ 16-50: expansion marginal. Tail real part ~ Σ_{γ>5000} 2Re[n/ρ − (n²−n)/(2ρ²) + (n³...)/...]: the full series: 1−(1−1/ρ)^n = −Σ_{k=1}^n C(n,k)(−1/ρ)^k: 2Re Σ_{γ>T}: Σ_k C(n,k)(−1)^{k+1}·2Re σ'_k(T) where σ'_k(T) = Σ_{γ>T}ρ^{−k}: 2Re σ'_1(T): conditionally small ~ S(T)/T·... ~0.001; 2Re σ'_2(T) ≈ −2Σ1/γ² ≈ −2(log(T/2π)+1)/(2πT)·... ≈ −2·7.68/31416 ≈ −4.9e-4; σ'_3(T) ≈ 2Σ Re ρ^{−3} ~ 2Σ(0.5³−3·0.5γ²)/γ⁶·... ≈ −3Σ1/γ⁴ ~ −3/(2πT³)·... ~0. So tail ≈ n·σ'_1 + C(n,2)·4.9e-4·... ≈ 300·(±0.001) + 44850·4.9e-4 = ±0.3 + 22!! Hmm sign: −C(n,2)·(−4.9e-4) = +21.97. So λ_300 = truncated + 22?? Earlier diag3 λ_200 truncated = 297.04 + tail(C(200,2)·4.9e-4 = 9.75) = 306.8 ✓✓ MATCHES E-015's 306.66 (within σ'_1 wobble ±0.3)!!! GREAT — so E-015's λ_200 is right, and the tail formula ~C(n,2)·4.9e-4 works.\n\nλ_300: truncated Σ_{γ≤5000} + [300·σ'_1 + 44850·4.9e-4] = truncated + [±0.3 + 21.97]. Compute truncated now. If truncated + 21.97 ≈ 519.70 (E-015) → E-015 right → E-021's S_f or S_inf wrong by 7.8e-8·... wait E-021's λ_300 dev from E-015 is only 7.8e-8 — the zero-side can't resolve 7.8e-8 (σ'_1 wobble ±0.3). USELESS for the dev question. \n\nHmm OK so I can't easily adjudicate 7.8e-8. Let me think about what grows like ×250 per 50 n... e^{0.11n}: what in the pipeline scales like that? (1+1/9)^n? e^{0.105n} ≈ (10/9)^n?! Interesting: 9 = ? Hmm. C(n, j)·δ_j with δ_j ~ constant ε: dominated by j=n: C(n,n)=1: ε — no growth. With δ_j ~ ε·r^j: Σ C(n,j)εr^j = ε(1+r)^n: growth (1+r)^n: e^{0.11n} → r = 0.116 ≈ 1/8.6?? What has an error ~ε·(1/8.6)^j?? Hmm, 3^{−j}: (4/3)^n = e^{0.288n} too fast. (1/8)^j: (9/8)^n = e^{0.118n} CLOSE to observed e^{0.11n}!? What decays like 8^{−j}? NOTHING obvious. Hmm, (3/2)^j? (5/2)^n... \n\nActually, let me just measure the dev at n = 210, 220, ..., 300 to get the growth rate precisely, and also the ABS dev — and compare |dev_abs| vs C(n,j)·|σ-errors|... \n\nWAIT. Actually — I wonder about σ_m for m=25..200 computed at dps 100 — sum(r**(−m) for r in rho): PYTHON BUILTIN sum at dps 100 ✓ fine. rho = [mp.mpc(0.5, float(g)) for g in zeros] at dps 60 (mp.mp.dps = 60 was set before rho)! mpc created at dps 60 — the mpc VALUES get rounded to 60 digits — fine (γ is float64 anyway).\n\nHmm, hmm. What about the ζ cache strings themselves for LARGE j? ζ(j) for j ~ 200-300 from the cache: built by flint.arb(j).zeta().str(1650) in the previous (buggy) session — flint, trustworthy ✓. S_∞ validated via V3 residual ✓.\n\nη_j for j=24..299: (1−2^{−(j+1)})ζ(j+1) − 1 + σ_{j+1}: at dps 243 (smoke full_digits=193): ζ parsed at 243: (1−2^{−(j+1)})ζ(j+1) ~ 1 + 3^{−(j+1)}: subtract 1: result 3^{−(j+1)} + σ: absolute error ~1e-243·1 = 1e-243 ✓.\n\nnstr(eta, full_digits=193): stores 193 sig digits ✓.\n\ncompute_Sf: parses at dps 243, sums at dps 173... at n=300 the sum needs: max term C(300,75)·η_74 ~ 10^{71}·10^{−35.4} = 10^{35.6}: guard = 173 − 35.6 = 137 digits ✓ fine.\n\nSo S_f(300) should be right to ~1e-100. λ_300 = S_inf[300] − S_f[300] + 1 → right to ~1e-84. E-015 right to ~1e-26 (CSV). Dev should be ~1e-26·rel = 5e-29. OBSERVED 1.5e-10!!! 19 orders of magnitude!!! WHAT?!\n\nUnless E-015's λ_300 is wrong by 7.8e-8!!! E-015's η recursion: dps 1450 — stability: my tests at k ≤ 110, dps 1000 → 1e-597 at j=100. At k=300, dps 1450: loss? The recursion at k=300 from dps 1450: probably ~1e-1300. Then λ sums at dps 1450: terms ~10^{37.5}(n=300)... λ_300 accurate to ~10^{−1310}·10^{37.5} = 10^{−1272}. Can't be 7.8e-8 wrong.\n\nHmm, OR: E-015's λ_300 via a DIFFERENT formula path — let me check E-015's script... E-015 used E-011's machinery per the docs (\"E-011/R-001: arithmetic side (BL Thm 2...)\"). \n\nWait wait wait. Actually — let me question S_∞(300)!!! S_inf[300] from compute_S_inf: Σ(−1)^j C(300,j)(1−2^{−j})ζ*(j). ζ*(1) from CACHE — cache zeta_str[1] = nstr(log(4π) + mp.mpf(GAMMA_E), 1650) — GAMMA_E IS THE DOUBLE!!! ζ*(1) error ~4.94e-21!!! j=1 term: (−1)·300·(1/2)·ζ*(1): error 300·0.5·4.94e-21 = 7.4e-19. Not 7.8e-8.\n\nAnd ζ*(j) for j ≥ 2 from cache — flint ✓.\n\nOK so WHAT produces 7.8e-8 at n=300, 7e-10 at n=250, 2e-12 at n=200?! Ratio per 50: ×350, ×350?! (7.8e-8/7e-10 = 111; 7e-10/2e-12 = 350; 2e-12/1.3e-15(150) = 1500). Ratios: 1500, 350, 111 — DECREASING×~3.2 each step. log-scale: error ~ C·a^n with a shrinking... error ~ e^{c·n^α}... or error ~ n^{k}: 200→300: (1.5)^k = 39 → k = 9.0; 250→300: (1.2)^k = 111 → k = 25.8. Not power. Error ~ b^{n}·n^k... \n\nHmm, actually — maybe look at it differently: errors 1.3e-15 (150), 2e-12 (200), 7e-10 (250), 7.8e-8 (300): log10: −14.9, −11.7, −9.15, −7.11. Deltas per 50: +3.2, +2.55, +2.04. Ratio of deltas: 0.80, 0.80!! GEOMETRIC in the log-increments → error ~ exp(c·n^α): Δlog10 error per Δn=50: d(n) = 3.2·0.8^{(n−150)/50}?? That converges: total log10 error → −14.9 + 3.2/(1−0.8) = +1.1?? error ~ 10^{1.1} at n → ∞??? That can't be — S_f/λ can't deviate that much... unless the error saturates. Fit: log10 err(n) = A − B·0.8^{n/50}: at n=150: A − B·0.216 = −14.9; n=200: A − B·0.1296 = −11.7; n=250: A − B·0.0778 = −9.15; n=300: A − B·0.0467 = −7.11. From first two: B·0.0864 = 3.2 → B = 37.04; A = −14.9 + 8.0 = −6.9. Check n=250: −6.9 − 37.04·0.0778 = −6.9−2.88 = −9.78?? observed −9.15. Meh, rough. n=300: −6.9 − 1.73 = −8.63 vs −7.11. Poor fit. Forget the law — find the MECHANISM.\n\nBISECTION: λ_300 dev = (S_inf − S_f + 1) − λ_E015. Compute S_f(300) using η_j for j ≤ 23 from Stieltjes and j ≥ 24 = 0 (drop the tail entirely): S_f_partial: then dev_partial. The dropped terms' true contribution: Σ_{j=24}^{300} C(300,j)η_{j−1} ~ ~O(1) (since full S_f = −2.48 and partial will show). Then add back in blocks (24..100, 101..200, 201..300) to find which block carries the 7.8e-8.\n\nDo it.","signature":""},{"type":"text","text":"GAMMA_E is a bare float (53-bit) — that's one bug (affects ζ*(1) and σ₁ diagnostics, ~5e-21 level). But the growing 7.8e-8 dev at n=300 is still unexplained. Bisecting the S_f sum by j-blocks."},{"type":"tool_use","id":"Bash_75","name":"Bash","input":{"command":"cd /d/Python/Quantum && ./.venv/Scripts/python.exe - <<'EOF'\nsrc = open(\"research/numerics/scripts/E-021-sinf-sf-curve.py\").read()\nsrc = src.replace('if __name__ == \"__main__\":', 'if False:')\nns = {\"__file__\": \"research/numerics/scripts/E-021-sinf-sf-curve.py\"}\nexec(compile(src, \"e21\", \"exec\"), ns)\nimport numpy as np, mpmath as mp\nzs = np.load(\"research/numerics/data/E-021-zeros-cache.npy\")\nzeta_str, fd = ns[\"get_zeta_strings\"](300)\neta_str = ns[\"compute_eta\"](zeta_str, fd, zs)\nS_inf = ns[\"compute_S_inf\"](300, zeta_str, fd)\nmp.mp.dps = 100\ne015 = {}\nfor line in open(\"research/numerics/data/E-015-li-coefficients-n3000.csv\"):\n p = line.strip().split(\",\")\n if p[0].isdigit(): e015[int(p[0])] = mp.mpf(p[1])\nmp.mp.dps = 700\neta = {j: mp.mpf(v) for j, v in eta_str.items()}\nn = 300\n# cumulative S_f and dev as blocks are added\ns = mp.mpf(0); c = mp.mpf(1)\nfor j in range(1, n+1):\n c = c*(n-j+1)/j\n s += c*eta[j-1]\n if j in (23, 50, 100, 150, 200, 250, 300):\n mp.mp.dps = 100\n lam = S_inf[n] - s + 1\n dev = abs(lam - e015[n]) / abs(e015[n])\n print(f\"after j={j:>3}: S_f_partial = {mp.nstr(s,12):>18} \"\n f\"rel dev = {float(dev):.3e}\")\n mp.mp.dps = 700\nEOF","description":"Bisect S_f(300) dev by j-blocks","timeout":600000},"extra_content":null}]