Jon Perry on Sat, 1 Jun 2002 18:52:33 +0100


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

RE: lex() feature


Is pi(n) a Pari/GP feature? (count number of primes to n)?

I came up with:

pi(n)=local(i,pic);pic=0;forprime (i=1,n,pic++);pic;

but I would have thought this would have been a Pari standard.

Jon Perry
perry@globalnet.co.uk
http://www.users.globalnet.co.uk/~perry/maths
BrainBench MVP for HTML and JavaScript
http://www.brainbench.com