Zeta Function

Skip to first unread message

Panna Lal Patodia

Feb 22, 2018, 7:50:54 AM2/22/18
to mpmath
Though the Zeta function for integer gives accurate result. I got different result for decimal.

For example,
zeta(2.1) = 1.560216533503362015758917170653014234218242329871913719457665460561046377382145741481950840260305962
to 100 decimal places.

However, when I used GP/PARI, I got the following result:

zeta(2.1) = 1.560216533503362083710516769691471924753050995905995862613928931079053836113791436865109088073718989

Both result tallies for 15 decimal place but beyond, the result differs drastically. I don't know which one is correct.

Please check.


Panna Lal Patodia

Andrey G. Grozin

Feb 22, 2018, 8:27:08 AM2/22/18
to mpmath
On Thu, 22 Feb 2018, Panna Lal Patodia wrote:
> zeta(2.1) = 1.560216533503362015758917170653014234218242329871913719457665460561046377382145741481950840260305962
> to 100 decimal places.
If you literally write zeta(2.1), then python first transforms 2.1 to a
double precision number, which is not exactly equal to 2.1; then it is
transformed by mpmath to a high-precision number which differs from 2.1
after about 15-th decimal place; and then zeta of this number is
calculated. Please write the argument of zeta correctly.


Aaron Meurer

Feb 22, 2018, 3:46:04 PM2/22/18
to mpm...@googlegroups.com
It would help to indicate what the correct way is. The correct way is
to specify 2.1 as a string, and wrap it in mpf, like


Aaron Meurer

> Andrey
> --
> You received this message because you are subscribed to the Google Groups
> "mpmath" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to mpmath+un...@googlegroups.com.
> To post to this group, send email to mpm...@googlegroups.com.
> Visit this group at https://groups.google.com/group/mpmath.
> For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
0 new messages