From Newsgroup: comp.lang.forth
In light of the recent announcement of the potential proof of the
Riemann hypothesis, I decided to check my implementation of Marcel
Hendrix's zzeta code. Per Riemann's hypothesis, the "non-trivial" roots
lie along a line in the complex plane, Re{s} = 1/2, Im{s} = t, where "s"
is the complex argument to the word ZZETA in MH's Forth code.
In my implementation, zzeta.4th, found in the kForth-64/32/Win-32
packages under forth-src/fsl/extras/ I had provided test code for both
the real and complex versions of the function; however, all of the
arguments, s, to the test code lay along the real axis (a comment within
the test code says that off-axis args are needed).
Below is code to verify the first hundred known roots of the Riemann
zeta function, along the "critical line", using zzeta.4th. Some of the
output is shown below. The first root sort of works -- the magnitude of
the zeta function is around 2e-9 at s = 1/2 + i* 14.13472514173469e0,
while the rest clearly are not close to zero. The precision being used
here is double precision. I'm not sure what the problem is. The next
step is to repeat this using the MPFR library.
--
KM
=== begin zzeta-verify-roots.4th ===
\ zzeta-verify-roots.4th
\
\ Verify the first 100 non-trivial roots of the Riemann zeta function.
\
\ The non-trivial roots of the Riemann zeta function were
\ hypothesized by Riemann to lie along the critical line,
\ Re(s) = 1/2 [1]. Preliminary proofs of the Riemann
\ hypothesis were publicized on 20 November 2026 by [2]--[3].
\
\ The location of the roots along the critical line i.e..
\ t = Im(s) for the first hundred roots [4] are checked against
\ a Forth implementation of the complex zeta function [5]
\ (zzeta.4th by Marcel Hendrix).
\
\ References:
\ 1.
https://en.wikipedia.org/wiki/Riemann_hypothesis
\ 2. Levent Alpoge and Claude AI,
https://alpo.ge/remark.pdf
\ 3. Ravi Vakil, on the unfinished proof by Alessandro M. Masullo,
\ "The Music of the Primes,"
\
https://math216.wordpress.com/2026/11/20/hurried-announcement-alessandro-masullo-grh/
\ 4.
https://www.lmfdb.org/zeros/zeta/
\ 5. Marcel Hendrix, post on comp.lang.forth 30 April 2012;
\ ported for use with FSL by K. Myneni on 2 May 2012 --
\ see zzeta.4th in the kForth-64/32/Win32 packages.
\
\ Notes:
\ 1. Although the test code in zzeta.4th [5] passes at a relative
\ error of 2e-16, all complex arguments for the complex zeta
\ function used Im{s} = 0.
\
\ K. Myneni, 2026-11-23
\
include ans-words
include modules
include fsl/fsl-util
include fsl/complex
include fsl/extras/zzeta
100 constant N_ROOTS
N_ROOTS COMPLEX ARRAY t_roots{
\ The imaginary values of the first 100 roots of
\ the Riemann zeta function along the critical line
\ z = 0.5e + i*t, for t > 0.
( 1) 14.1347251417346937904572519835625e0
( 2) 21.0220396387715549926284795938969e0
( 3) 25.0108575801456887632137909925628e0
( 4) 30.4248761258595132103118975305840e0
( 5) 32.9350615877391896906623689640747e0
( 6) 37.5861781588256712572177634807053e0
( 7) 40.9187190121474951873981269146334e0
( 8) 43.3270732809149995194961221654068e0
( 9) 48.0051508811671597279424727494277e0
( 10) 49.7738324776723021819167846785638e0
( 11) 52.9703214777144606441472966088808e0
( 12) 56.4462476970633948043677594767060e0
( 13) 59.3470440026023530796536486749922e0
( 14) 60.8317785246098098442599018245241e0
( 15) 65.1125440480816066608750542531836e0
( 16) 67.0798105294941737144788288965221e0
( 17) 69.5464017111739792529268575265547e0
( 18) 72.0671576744819075825221079698261e0
( 19) 75.7046906990839331683269167620305e0
( 20) 77.1448400688748053726826648563047e0
( 21) 79.3373750202493679227635928771161e0
( 22) 82.9103808540860301831648374947706e0
( 23) 84.7354929805170501057353112068276e0
( 24) 87.4252746131252294065316678509191e0
( 25) 88.8091112076344654236823480795095e0
( 26) 92.4918992705584842962597252418105e0
( 27) 94.6513440405198869665979258152080e0
( 28) 95.8706342282453097587410292192467e0
( 29) 98.8311942181936922333244201386224e0
( 30) 101.3178510057313912287854479402924e0
( 31) 103.7255380404783394163984081086952e0
( 32) 105.4466230523260944936708324141119e0
( 33) 107.1686111842764075151233519630860e0
( 34) 111.0295355431696745246564503099445e0
( 35) 111.8746591769926370856120787167707e0
( 36) 114.3202209154527127658909372761910e0
( 37) 116.2266803208575543821608043120647e0
( 38) 118.7907828659762173229791397026999e0
( 39) 121.3701250024206459189455329704998e0
( 40) 122.9468292935525882008174603307700e0
( 41) 124.2568185543457671847320079661301e0
( 42) 127.5166838795964951242793237669060e0
( 43) 129.5787041999560509857680339061800e0
( 44) 131.0876885309326567235663724615015e0
( 45) 133.4977372029975864501304920426407e0
( 46) 134.7565097533738713313260641571699e0
( 47) 138.1160420545334432001915551902824e0
( 48) 139.7362089521213889504500465233824e0
( 49) 141.1237074040211237619403538184753e0
( 50) 143.1118458076206327394051238689139e0
( 51) 146.0009824867655185474025075964246e0
( 52) 147.4227653425596020495211850104316e0
( 53) 150.0535204207848803514324672369594e0
( 54) 150.9252576122414667618525246783058e0
( 55) 153.0246938111988961982565442551854e0
( 56) 156.1129092942378675697501893101691e0
( 57) 157.5975918175940598875305031584988e0
( 58) 158.8499881714204987241749947755403e0
( 59) 161.1889641375960275194373441293695e0
( 60) 163.0307096871819872433110390006880e0
( 61) 165.5370691879004188300389193548749e0
( 62) 167.1844399781745134409577562462105e0
( 63) 169.0945154155688214895058711814318e0
( 64) 169.9119764794116989666998435958216e0
( 65) 173.4115365195915529598461186493456e0
( 66) 174.7541915233657258133787624558669e0
( 67) 176.4414342977104188888926410578611e0
( 68) 178.3774077760999772858309354141843e0
( 69) 179.9164840202569961393400366120511e0
( 70) 182.2070784843664619154070372269880e0
( 71) 184.8744678483875088009606466172344e0
( 72) 185.5987836777074714665277042683928e0
( 73) 187.2289225835018519916415405861313e0
( 74) 189.4161586560169370848522890998453e0
( 75) 192.0266563607137865472836314255836e0
( 76) 193.0797266038457040474022057943760e0
( 77) 195.2653966795292353214631878148621e0
( 78) 196.8764818409583169486222639146962e0
( 79) 198.0153096762519124249199187022090e0
( 80) 201.2647519437037887330161334275482e0
( 81) 202.4935945141405342776866606378642e0
( 82) 204.1896718031045543307164383863137e0
( 83) 205.3946972021632860252123793906930e0
( 84) 207.9062588878062098615019679077537e0
( 85) 209.5765097168562598528356442898868e0
( 86) 211.6908625953653075639074867307192e0
( 87) 213.3479193597126661906391220210726e0
( 88) 214.5470447834914232229442010725905e0
( 89) 216.1695385082637002658695633544983e0
( 90) 219.0675963490213789856772565904373e0
( 91) 220.7149188393140033691155926339062e0
( 92) 221.4307055546933387320974751192761e0
( 93) 224.0070002546043352117288755285048e0
( 94) 224.9833246695822875037825236805285e0
( 95) 227.4214442796792913104614361606596e0
( 96) 229.3374133055253481077600833060557e0
( 97) 231.2501887004991647738061867700103e0
( 98) 231.9872352531802486037716685391979e0
( 99) 233.6934041789083006407044947325696e0
( 100) 236.5242296658162058024755079556632e0
N_ROOTS t_roots{ }fput
\ Compute the Riemann zeta function for imaginary
\ values along the critical line, and print their values
\ and magnitudes
0 ptr t{
variable n
: }zzeta-critical ( a n -- )
n ! to t{
precision
6 set-precision
n @ 0 ?DO
I 1+ 4 .r 2 spaces
t{ I } f@ fs. 2 spaces
0.5e0 t{ I } f@ zzeta zdup zs. 2 spaces
|z| fs. cr
LOOP cr
set-precision
;
cr
cr .( Computing the Riemann zeta function for the first ) N_ROOTS .
.( non-trivial roots.) cr
cr
cr .( # t zeta[0.5+i*t] |zeta| )
cr .( ------------------------------------------------------------ )
cr
t_roots{ N_ROOTS }zzeta-critical
=== end zzeta-verify-roots.4th ===
The output is given below.
=== begin output ===
include zzeta-verify-roots
FSL-UTIL V1.3d 21 Apr 2024 EFC, KM
Riemann Zeta Function Version 1.00 MHX
Computing the Riemann zeta function for the first 100 non-trivial roots.
# t zeta[0.5+i*t] |zeta| ------------------------------------------------------------
1 1.41347e+01 -2.10915e-09 + i2.10804e-09 2.98200e-09
2 2.10220e+01 -6.85728e-06 + i2.67185e-05 2.75845e-05
3 2.50109e+01 5.08203e-04 - i2.46217e-04 5.64706e-04
4 3.04249e+01 -5.57662e-03 + i1.97929e-03 5.91745e-03
5 3.29351e+01 -1.32444e-02 - i4.98160e-03 1.41503e-02
6 3.75862e+01 -1.48189e-02 + i9.63718e-02 9.75044e-02
7 4.09187e+01 7.92953e-02 + i4.20550e-02 8.97573e-02
8 4.33271e+01 7.00990e-02 + i1.91228e-01 2.03672e-01
9 4.80052e+01 1.53730e-01 - i2.52021e-01 2.95207e-01
10 4.97738e+01 1.44661e-01 + i2.43717e-01 2.83417e-01
11 5.29703e+01 7.01679e-01 - i2.28994e-01 7.38100e-01
12 5.64462e+01 6.63649e-01 - i1.22419e-01 6.74845e-01
13 5.93470e+01 2.19595e-01 - i4.66364e-01 5.15478e-01
...
=== output truncated ===
--- Synchronet 3.21e-Linux NewsLink 1.2