Karim Belabas on Mon, 03 May 2004 19:54:43 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: Euler product |
* Karim Belabas [2004-05-03 17:11]: > * old [2004-05-03 12:08]: > > Here is the constants I want to compute: > > > > C(h)=prodeuler(p=2,infinity, (1+(1+1/p)^h/(p-1))/(1+(1+1/p)^(h-1)/(p-1))) > > > > and with h quite large (up to 50). > > > > I have a prodeulerrat by Henri Cohen, but the results are incoherent > > Looks like prodeulerrat uses heuristic bounds to evaluate the required > accuracy. Catastrophic cancellation occured and was hidden away by the > subsequent precision(res, pr), which added meaninless trailing zeroes to > the result. > > Try the attached variant, it should be slightly slower, but much safer > [ also includes sumeulerrat() ]. As Olivier pointed out by private email, there was an off-by-1 error in the attached file (one could get a "non existent component in truecoeff" error). I have updated the "Contributed Scripts" page http://www.math.u-psud.fr/~belabas/pari/scripts/ with a corrected script. So, please use http://www.math.u-psud.fr/~belabas/pari/scripts/cohen.gp instead. Cheers, Karim. -- Karim Belabas Tel: (+33) (0)1 69 15 57 48 Dep. de Mathematiques, Bat. 425 Fax: (+33) (0)1 69 15 60 19 Universite Paris-Sud http://www.math.u-psud.fr/~belabas/ F-91405 Orsay (France) http://pari.math.u-bordeaux.fr/ [PARI/GP]