---------- Forwarded message ----------
From: Robert Miller <r...@rlmiller.org>
Date: Tue, Jun 22, 2010 at 10:34 PM
Subject: Re: need help with sage regarding precomputed primes in pari
To: Gagan Sekhon <sek...@math.uconn.edu>
On Tue, Jun 22, 2010 at 10:18 PM, Gagan Sekhon <sek...@math.uconn.edu> wrote:
> So I was trying to get the Galois closure of a Number field and
> encountered the following error
>
>
> sage.libs.pari.gen.PariError: not enough precomputed primes (34)
>
>
> I know there is a way to extend the number of precomputed primes in
> pari, however it is currently escaping me. Can you please remind me
> what that command is?
This is for pure Pari:
http://pari.math.u-bordeaux.fr/archives/pari-users-0503/msg00006.html
In Sage, you should look at the functions pari._primelimit and pari.init_primes:
sage: pari._primelimit?
Type: builtin_function_or_method
Base Class: <type 'builtin_function_or_method'>
String Form: <built-in method _primelimit of
sage.libs.pari.gen.PariInstance object at 0x101b9b140>
Namespace: Interactive
Definition: pari._primelimit(self)
Docstring:
Return the number of primes already computed in this Pari instance.
EXAMPLES:
sage: pari._primelimit() 500519
sage: pari.init_primes(600000)
sage: pari._primelimit() 600000
Class Docstring:
<attribute '__doc__' of 'builtin_function_or_method' objects>
sage: pari.init_primes?
Type: builtin_function_or_method
Base Class: <type 'builtin_function_or_method'>
String Form: <built-in method init_primes of
sage.libs.pari.gen.PariInstance object at 0x101b9b140>
Namespace: Interactive
Definition: pari.init_primes(self, _M)
Docstring:
Recompute the primes table including at least all primes up to M
(but possibly more).
EXAMPLES:
sage: pari.init_primes(200000)
Class Docstring:
<attribute '__doc__' of 'builtin_function_or_method' objects>
I hope this helps!
> Thank you,
> Gagan
>
--
Robert L. Miller
http://www.rlmiller.org/
--
Robert L. Miller
http://www.rlmiller.org/
And the reason that error occurs is often because you're trying to do
number theory without assuming the GRH. To assume GRH (++), do
sage: proof.number_field(False)
This will make some algebraic number fields computations thousands of
times faster.
-- William
--
William Stein
Professor of Mathematics
University of Washington
http://wstein.org