Karim BELABAS on Mon, 13 Jan 2003 12:43:20 +0100 (MET)


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

Re: Pi


On Sun, 12 Jan 2003, Ralf Stephan wrote:
> The manual says (p.69) a copy of Pi is created on the heap for quicker
> computations next time the function is called. This does not seem
> to be true in 2.2.4 as with both \p 12000 and 12200, Pi needs about
> one second here (I know it's fast enough but the manual says it).

(12:36) gp > \p12000
   realprecision = 12002 significant digits (12000 digits displayed)
(12:36) gp > Pi;
time = 170 ms.
(12:36) gp > Pi;
time = 0 ms.
(12:36) gp > Pi;
time = 0 ms.

First call is "slow" [ compute Pi and cache it ], next ones are
instantaneous. What is your specific example ?

Cheers,

    Karim.
-- 
Karim Belabas                    Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425  Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud             Email: Karim.Belabas@math.u-psud.fr
F-91405 Orsay (France)           http://www.math.u-psud.fr/~belabas/
--
PARI/GP Home Page: http://www.parigp-home.de/