Ticket #3658 (new defect)

Opened 5 months ago

A PARI bug results in an unreliable prime_pi

Reported by: fwclarke Assigned to: was
Priority: minor Milestone: sage-3.2.2
Component: number theory Keywords:
Cc:

Description

----------------------------------------------------------------------
| SAGE Version 3.0.5, Release Date: 2008-07-11                       |
| Type notebook() for the GUI, and license() for information.        |
----------------------------------------------------------------------

sage: [prime_pi(n) for n in [500508..500510]]
[41580, 45056, 41581]
sage: [prime_pi(n) for n in [500508..500510]]
[41580, 41581, 41581]

The problem lies with pari/gp:

sage: %gp

  --> Switching to GP/PARI interpreter <-- 

''
gp: for(n=500508, 500510, print(primepi(n)))

41580
45056
  *** primepi: not enough precomputed primes, need primelimit ~ 500510.