Karim BELABAS on Thu, 24 Jan 2002 00:51:45 +0100 (MET)


[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]

Re: psi(z) for Im(z) >> 1?


On Mon, 9 Apr 2001, Matias Atria wrote:
> My apologies if this is already known. There's a problem with the
> computation of psi(z) when Im(z) is moderately large. The version of GP I'm
> using is
>
>                   GP/PARI CALCULATOR Version 2.1.0 (released)
>                 i686 running linux (ix86 kernel) 32-bit version
>                 (readline v2.2 enabled, extended help available)
>
> and I'm getting this:
>
> ? psi(1.2+100*I)
> %1 = 4.605189310446618887011272357 + 1.563800184428028749658853710*I
> ? psi(1.2+100.*I)
> %2 = 4.605188901735109764779067052 + 1.563794008870291303171926465*I
> ? \p200
>    realprecision = 202 significant digits (200 digits displayed)
> ? psi(1.2+100.*I)
> %3 = 4.6051905(...) + 1.563796(...)*I \\ <-- CORRECT
> ? \p28
>    realprecision = 28 significant digits
> ? psi(1.2+200*I)
> %5 = 3.591026996537060725697785476 + 5.378904945490827754765786142*I
> ? psi(1.2+200.*I)
> %6 = 0.6084323283704262549545579944 + 1.796033268559931806612149379*I

My apologies for answering so late...

I have changed the implementation of the psi function (starting from a GP
script provided by H. Cohen). I now get:

(00:43) gp > psi(1.2+100*I)
%1 = 4.605190519260759507082235834 + 1.563796382795210255460351189*I
(00:43) gp > psi(1.2+100.*I)
%2 = 4.605190519260759507082235834 + 1.563796382795210255460351189*I
(00:43) gp > \p200
   realprecision = 202 significant digits (200 digits displayed)
(00:43) gp > psi(1.2+100.*I)
%3 = 4.6051905192607595070822358346232608790882412556203061825739917262264825811703230033362389181676623229269403496147271578850796010317937990330039022947466327447529815067838771682218883246441029751720423 + 1.5637963827952102554603511899424767828783318168866250094232556526629679832481233442067957022565610765493190661329826865108244349018049634214744097974482225823797428741263933349026999465598533051992738*I
(00:43) gp > \p28
   realprecision = 28 significant digits
(00:43) gp > psi(1.2+200*I)
%4 = 5.298322449877578367124340578 + 1.567296333794906419514331513*I
(00:43) gp > psi(1.2+200.*I)
%5 = 5.298322449877578367124340578 + 1.567296333794906419514331513*I

which looks much more sensible (I didn't include timings, but it's also much
faster than before). Please check out the current CVS (development) version
if you want to test this patch.

Cheers,

    Karim.

P.S: I have not updated the 64bit benches yet. Tomorrow...
-- 
Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathematiques, Bat. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas
--
PARI/GP Home Page: http://www.parigp-home.de/