← Session 37 — Paper A revisions: certificate retraction + margin fix
thinking (417 chars)
`acb.digamma` exists. mpmath reference values:
- t=0: 0.73568
- t=1: 1.31764
- t=4.7: 0.59584
- t=10: 0.53646
The max 1.33237 is somewhere else (near t ≈ 1.2-1.5 maybe). Good.
Now let me prototype the FE formula and cross-check at these 4 points:
f(s) = log π − ½ψ((1−s)/2) − ½ψ(s/2) + Σ_{n≥1} Λ(n) n^{s−1}, s = −2.5 + it.
With acb at 128 bits, N = 400 terms + certified tail. Compare |f| vs mpmath's values above.
`acb.digamma` exists. Prototyping the FE log-derivative and cross-checking against mpmath.
tool: Bash
input
{
"command": "./.venv/Scripts/python.exe -c \"\nfrom flint import acb, arb, ctx\nctx.prec = 128\nfrom mpmath import mp, log as mlog\nmp.mp.dps = 50\nPI = acb.pi()\n# von Mangoldt via mpmath-free sieve\nimport math\nLIM = 500\nLam = [0.0]*(LIM+1)\ndef sieve_mangoldt(n):\n lam = [0.0]*(n+1)\n sieve = [True]*(n+1)\n for p in range(2, n+1):\n if sieve[p]:\n lp = math.log(p)\n k = p\n while k <= n:\n lam[k] = lp\n for m in range(k, n+1, k):\n sieve[m] = False\n k *= p\n return lam\nLam = sieve_mangoldt(LIM)\ndef logderiv_zeta_seg(t, N=400):\n s = acb(arb('-2.5'), arb(repr(t)))\n w = 1 - s # 3.5 - it\n # digamma part\n f = PI.log() - acb('0.5')*acb.digamma((1-s)/2) - acb('0.5')*acb.digamma(s/2)\n # series part sum Lambda(n) n^{s-1} = Lambda(n) n^{-3.5+it}\n tot = acb(0)\n it = acb(0, arb(repr(t)))\n for n in range(2, N+1):\n if Lam[n] != 0.0:\n tot += acb(repr(Lam[n])) * (acb(n) ** (s - 1))\n f = f + tot\n # certified tail: sum_{n>N} log n * n^-3.5 <= [(log N)/(2.5) + 1/2.5^2] N^-2.5 + (log N) N^-3.5\n lnN = arb(N).log()\n tail = (lnN/arb('2.5') + 1/arb('6.25')) * (arb(N) ** arb('-2.5')) + lnN * (arb(N) ** arb('-3.5'))\n return f, tail\nfor t in [0.0, 1.0, 4.7, 10.0]:\n f, tail = logderiv_zeta_seg(t)\n print(t, '|f| ball:', f.abs(), ' tail<=', tail.upper())\n\" 2>&1 | head -10",
"description": "Prototype FE log-derivative vs mpmath reference",
"timeout": 180000
}
raw content_json (database row)
[{"type":"thinking","thinking":"`acb.digamma` exists. mpmath reference values:\n- t=0: 0.73568\n- t=1: 1.31764\n- t=4.7: 0.59584\n- t=10: 0.53646\n\nThe max 1.33237 is somewhere else (near t ≈ 1.2-1.5 maybe). Good.\n\nNow let me prototype the FE formula and cross-check at these 4 points:\nf(s) = log π − ½ψ((1−s)/2) − ½ψ(s/2) + Σ_{n≥1} Λ(n) n^{s−1}, s = −2.5 + it.\n\nWith acb at 128 bits, N = 400 terms + certified tail. Compare |f| vs mpmath's values above.","signature":""},{"type":"text","text":"`acb.digamma` exists. Prototyping the FE log-derivative and cross-checking against mpmath."},{"type":"tool_use","id":"Bash_146","name":"Bash","input":{"command":"./.venv/Scripts/python.exe -c \"\nfrom flint import acb, arb, ctx\nctx.prec = 128\nfrom mpmath import mp, log as mlog\nmp.mp.dps = 50\nPI = acb.pi()\n# von Mangoldt via mpmath-free sieve\nimport math\nLIM = 500\nLam = [0.0]*(LIM+1)\ndef sieve_mangoldt(n):\n lam = [0.0]*(n+1)\n sieve = [True]*(n+1)\n for p in range(2, n+1):\n if sieve[p]:\n lp = math.log(p)\n k = p\n while k <= n:\n lam[k] = lp\n for m in range(k, n+1, k):\n sieve[m] = False\n k *= p\n return lam\nLam = sieve_mangoldt(LIM)\ndef logderiv_zeta_seg(t, N=400):\n s = acb(arb('-2.5'), arb(repr(t)))\n w = 1 - s # 3.5 - it\n # digamma part\n f = PI.log() - acb('0.5')*acb.digamma((1-s)/2) - acb('0.5')*acb.digamma(s/2)\n # series part sum Lambda(n) n^{s-1} = Lambda(n) n^{-3.5+it}\n tot = acb(0)\n it = acb(0, arb(repr(t)))\n for n in range(2, N+1):\n if Lam[n] != 0.0:\n tot += acb(repr(Lam[n])) * (acb(n) ** (s - 1))\n f = f + tot\n # certified tail: sum_{n>N} log n * n^-3.5 <= [(log N)/(2.5) + 1/2.5^2] N^-2.5 + (log N) N^-3.5\n lnN = arb(N).log()\n tail = (lnN/arb('2.5') + 1/arb('6.25')) * (arb(N) ** arb('-2.5')) + lnN * (arb(N) ** arb('-3.5'))\n return f, tail\nfor t in [0.0, 1.0, 4.7, 10.0]:\n f, tail = logderiv_zeta_seg(t)\n print(t, '|f| ball:', f.abs(), ' tail<=', tail.upper())\n\" 2>&1 | head -10","description":"Prototype FE log-derivative vs mpmath reference","timeout":180000},"extra_content":null}]