← Session 5 — Phase 0: paper deep-read + Bombieri–Lagarias literature
thinking (2458 chars)
Even 1/7 is wrong at digit 16!! 0.1428571428571428**4921**... — so basic mpf DIVISION is broken beyond double precision. This is a fundamental mpmath-on-Python-3.14 breakage: likely `int.to_bytes`/`math.frexp`/`float` conversions... Actually: the values are correct to ~double precision then garbage — hallmark of mpmath falling back to float arithmetic somewhere, OR libmp's normalization loops broken by a Python 3.14 change. Possibly `int.__index__`/`operator.index` behavior, or the `math` module's ldexp... whatever.
CRITICAL QUESTION: which past results are affected?
- E-001 (window constants, 60-digit): used sympy + mpmath — sympy is INDEPENDENT (its own mpmath-free backend? sympy uses mpmath for evalf!! sympy 1.14 evalf calls mpmath...). E-001 "both PASS" at 60-digit — if mpmath broken, how did it pass? Maybe E-001's comparisons were against values computed with the SAME broken mpmath (both sides) — self-consistent but wrong at digit 16+? But E-001 compared against HAND-derived R(ψ_MT) = 1.32749930 — 8 digits only — can't see the bug.
- E-002 zeros: zetazero — the values matched known zeros to... I verified 14.1347251417346946311681676889 — is that the KNOWN value? Known first zero: 14.1347251417346937904572519835624... — mpmath gave 14.134725141734694**6311681676889** vs known 14.134725141734693**7904572519835** — DIFFERENT from digit 16!!! So even E-002's zeros are wrong beyond 16 digits! But λ_1 from E-008 matched literature to... λ_1 known 0.023095708966121: E-008's zero-side λ_1 = 0.02296 — within its tail bound 5.4e-4 — only 3-digit agreement — never tested digit 17!
So: ALL mpmath-based results in this venv are only reliable to ~15 digits. Everything done at dps 25-60 claiming 20+ digit accuracy is actually ~15-digit accurate. The qualitative results (checks passing within tolerances like 1e-9) — mostly still valid since tolerances ≫ 1e-15... but the E-009a "25-digit validations" are only ~15-digit trustworthy — still fine for their purpose (validating formulas to 1e-15 vs tolerances used).
The root cause must be identified: is it ALL mpf ops? 1/7 wrong at digit 16 — division broken. Actually wait — maybe it's the STRING conversion (nstr) that's broken, not the arithmetic! 1/7 stored correctly but printed wrong? Test: mp.mpf(1)/7 == mp.mpf('0.142857142857142857142857142857...')? Compare internally: (1/7 - from_string) and print the difference... if printing is the broken step, the difference would be 0.
Even 1/7 is wrong at digit 16 — but maybe it's the *printing* that's broken, not the arithmetic. Testing internally.
tool: Bash
input
{
"command": "cd D:/Python/Quantum && ./.venv/Scripts/python.exe << 'EOF'\nimport mpmath as mp\nmp.dps = 50\na = mp.mpf(1)/7\nb = mp.mpf('0.14285714285714285714285714285714285714285714285714')\nprint('diff:', mp.nstr(abs(a-b), 5))\n# integer check: (1/7)*7 - 1\nc = a*7 - 1\nprint('(1/7)*7-1:', mp.nstr(c, 5))\n# exact fraction test via mpf from rational\nfrom fractions import Fraction\nprint('float(a):', float(a))\nimport mpmath.libmp as libmp\nprint('man/exp of a:', a._mpf_)\nEOF",
"description": "Distinguish arithmetic vs printing bug"
}
raw content_json (database row)
[{"type":"thinking","thinking":"Even 1/7 is wrong at digit 16!! 0.1428571428571428**4921**... — so basic mpf DIVISION is broken beyond double precision. This is a fundamental mpmath-on-Python-3.14 breakage: likely `int.to_bytes`/`math.frexp`/`float` conversions... Actually: the values are correct to ~double precision then garbage — hallmark of mpmath falling back to float arithmetic somewhere, OR libmp's normalization loops broken by a Python 3.14 change. Possibly `int.__index__`/`operator.index` behavior, or the `math` module's ldexp... whatever.\n\nCRITICAL QUESTION: which past results are affected?\n- E-001 (window constants, 60-digit): used sympy + mpmath — sympy is INDEPENDENT (its own mpmath-free backend? sympy uses mpmath for evalf!! sympy 1.14 evalf calls mpmath...). E-001 \"both PASS\" at 60-digit — if mpmath broken, how did it pass? Maybe E-001's comparisons were against values computed with the SAME broken mpmath (both sides) — self-consistent but wrong at digit 16+? But E-001 compared against HAND-derived R(ψ_MT) = 1.32749930 — 8 digits only — can't see the bug.\n- E-002 zeros: zetazero — the values matched known zeros to... I verified 14.1347251417346946311681676889 — is that the KNOWN value? Known first zero: 14.1347251417346937904572519835624... — mpmath gave 14.134725141734694**6311681676889** vs known 14.134725141734693**7904572519835** — DIFFERENT from digit 16!!! So even E-002's zeros are wrong beyond 16 digits! But λ_1 from E-008 matched literature to... λ_1 known 0.023095708966121: E-008's zero-side λ_1 = 0.02296 — within its tail bound 5.4e-4 — only 3-digit agreement — never tested digit 17!\n\nSo: ALL mpmath-based results in this venv are only reliable to ~15 digits. Everything done at dps 25-60 claiming 20+ digit accuracy is actually ~15-digit accurate. The qualitative results (checks passing within tolerances like 1e-9) — mostly still valid since tolerances ≫ 1e-15... but the E-009a \"25-digit validations\" are only ~15-digit trustworthy — still fine for their purpose (validating formulas to 1e-15 vs tolerances used).\n\nThe root cause must be identified: is it ALL mpf ops? 1/7 wrong at digit 16 — division broken. Actually wait — maybe it's the STRING conversion (nstr) that's broken, not the arithmetic! 1/7 stored correctly but printed wrong? Test: mp.mpf(1)/7 == mp.mpf('0.142857142857142857142857142857...')? Compare internally: (1/7 - from_string) and print the difference... if printing is the broken step, the difference would be 0.","signature":""},{"type":"text","text":"Even 1/7 is wrong at digit 16 — but maybe it's the *printing* that's broken, not the arithmetic. Testing internally."},{"type":"tool_use","id":"Bash_212","name":"Bash","input":{"command":"cd D:/Python/Quantum && ./.venv/Scripts/python.exe << 'EOF'\nimport mpmath as mp\nmp.dps = 50\na = mp.mpf(1)/7\nb = mp.mpf('0.14285714285714285714285714285714285714285714285714')\nprint('diff:', mp.nstr(abs(a-b), 5))\n# integer check: (1/7)*7 - 1\nc = a*7 - 1\nprint('(1/7)*7-1:', mp.nstr(c, 5))\n# exact fraction test via mpf from rational\nfrom fractions import Fraction\nprint('float(a):', float(a))\nimport mpmath.libmp as libmp\nprint('man/exp of a:', a._mpf_)\nEOF","description":"Distinguish arithmetic vs printing bug"},"extra_content":null}]