On 10/24/26 17:44, marcel hendrix wrote:
> On 10/24/2026 8:29 PM, Krishna Myneni wrote:
...
>> If you post these new calculations which have problems in ver 3.1, I can test them with ver 4.1.
>
...
>
> I've found additional issues with mpfr_zeta. Here the Borwein algorithm #2 delivers results as good as Mathematica, while mpfr_zeta is far from the expected 40 decimals.
>
> : F#ZETA ( -- ) F#TOS DUP F#RND mpfr_zeta DROP ; ( tos <= zeta[tos] )
>
> Here is the correct output of the Borwein algorithm ( IIRC you have that ) in iForth vs. the mpfr result for a couple of integer inputs:
>
> FORTH> .zeta \ input -- Borwein -- mpfr
> 2 1.6449340668482264364724151666460251892189e+0000 1.3116821137232264364724151666460251892189e+0000
> 3 1.2020569031595942853997381615114499907649e+0000 1.0592003052592036603997381615114499907649e+0000
> 4 1.0823232337111381915160036965411679027747e+0000
I have a double precision version of the zeta function based on your code, with automated tests from your computed reference values in the kForth-x packages: forth-src/fsl/extras/zzeta.4th
=== snippet from zzeta.4th ===
...
\ 60 digit reference values computed by Marcel Hendrix
\ using MPFR/MPC version of zzeta.
1e 0e f/ fconstant +inf
cr
TESTING ZETA
t{ 0e zeta -> -5.00000000000000e-01 r}t
t{ 1e zeta -> +inf r}t
t{ 2e zeta -> 1.6449340668482264364724151666460251892190e r}t
t{ 3e zeta -> 1.2020569031595942853997381615114499907651e r}t
t{ 4e zeta -> 1.0823232337111381915160036965411679027749e r}t
...
=== end snippet ===
Later today I will code an mpfr version and print out the 60 digit reference values.
--
Krishna