Skip to content

A PARI bug results in an unreliable prime_pi #3658

@sagetrac-fwclarke

Description

@sagetrac-fwclarke
----------------------------------------------------------------------
| 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.

Component: number theory

Issue created by migration from https://trac.sagemath.org/ticket/3658

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions