FWIW, I think this shows that arithmetic (division...) with lisp is not so bad
compared with pari (although obviously this is
**only a simple test**).
Cf. Knuth (TAOCP vol. I) for "the worst case for Euclides' algorithm
occurs for two consecutive
fibonacci numbers").
Tests in Pentium 933 linux kernel 2.4.10.
$maxima.clisp
(...snip...)
(C1) showtime:true$
Evaluation took 0.01 seconds (0.01 elapsed)
(C2) a:fibonacci(1000001)$
Evaluation took 0.00 seconds (0.00 elapsed)
(C3) a:fib(1000001)$
Evaluation took 0.69 seconds (0.69 elapsed)
(C4) b:fib(1000002)$
Evaluation took 0.68 seconds (0.69 elapsed)
(C5) gcd(a,b)$
Evaluation took 49.73 seconds (49.75 elapsed)
(C6) quit();
-------------------------while:
$./gp-dyn
GP/PARI CALCULATOR Version 2.1.3 (released)
i686 running linux (ix86 kernel) 32-bit version
(readline v4.1 enabled, extended help not available)
Copyright (C) 2000 The PARI Group
PARI/GP is free software, covered by the GNU General Public License, and
comes WITHOUT ANY WARRANTY WHATSOEVER.
Type ? for help, \q to quit.
Type ?12 for how to get moral (and possibly technical) support.
realprecision = 28 significant digits
seriesprecision = 16 significant terms
format = g0.28
parisize = 4000000, primelimit = 500000
? a=fibonacci(1000001);
? b=fibonacci(1000002);
? gettime();
? gcd(a,b);
? gettime()
%5 = 206350
--------------------------------------------------------------------
I may be misusing pari, though? If so (which is likely), what should
I do?
TA,
Pedro Fortuny.
--
Pedro Fortuny Ayuso -------------> www.maths.qmul.ac.uk/~pf
School of Mathematical Sciences. Queen Mary College, Univ. London
Mile End Road, London E1 4NS, UK ------> www.qmul.ac.uk
P.Fortuny@maths.qmul.ac.uk Tfn. Nr. 44 20 7882 5493