Andrew Walker on Tue, 24 Sep 2013 06:52:12 +0200


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

Zeta() changes in recent versions?


I'm just wondering what changes have been made with zeta() evaluation between the 2.5.X series and the 2.6.X series.
For multiple evaluations (eg series) it can be slower which makes me think some of its reuse behavior has been removed or is broken.
The times for the single zeta() repeated at the end show this as well, under 2-5-4 it gets quicker, 2-6-1 it is the same.

For example, evaluating the prime zeta function:

C:\Users\Andrew\Downloads>gp-2-5-4.exe
                  GP/PARI CALCULATOR Version 2.5.4 (released)
           i686 running mingw (ix86/GMP-5.0.1 kernel) 32-bit version
                    compiled: May 13 2013, gcc-4.6.3 (GCC)
               (readline not compiled in, extended help enabled)

                    Copyright (C) 2000-2013 The PARI Group

PARI/GP is free software, covered by the GNU General Public License, and comes
WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.

parisize = 4000000, primelimit = 500509
? pz(x)=
{
local(sm,n,a);
sm=0;
for(n=1,100000,a=moebius(n);if(a !=0, sm=sm+a*log(zeta(n*x))/n)   );
return(sm);
}
? gettime;pz(0.1+10*I);gettime
%2 = 187
? gettime;pz(0.05+10*I);gettime
%3 = 328
? gettime;pz(0.01+10*I);gettime
%4 = 2964
? gettime;zeta(0.5+10000*I);gettime
%5 = 93
? gettime;zeta(0.5+10000*I);gettime
%6 = 16
?

New version:

C:\Users\Andrew\Downloads>gp-2-6-1.exe
                   GP/PARI CALCULATOR Version 2.6.1 (alpha)
           i686 running mingw (ix86/GMP-5.0.1 kernel) 32-bit version
                compiled: Sep 20 2013, gcc version 4.6.3 (GCC)
               (readline not compiled in, extended help enabled)

                    Copyright (C) 2000-2013 The PARI Group

PARI/GP is free software, covered by the GNU General Public License, and comes
WITHOUT ANY WARRANTY WHATSOEVER.

Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.

parisize = 4000000, primelimit = 500000
? pz(x)=
{
local(sm,n,a);
sm=0;
for(n=1,100000,a=moebius(n);if(a !=0, sm=sm+a*log(zeta(n*x))/n)   );
return(sm);
}
? gettime;pz(0.1+10*I);gettime
%2 = 437
? gettime;pz(0.05+10*I);gettime
%3 = 1343
? gettime;pz(0.01+10*I);gettime
%4 = 44976
? gettime;zeta(0.5+10000*I);gettime
%5 = 156
? gettime;zeta(0.5+10000*I);gettime
%6 = 156
?

Thanks!

Andrew