Karim BELABAS on Wed, 29 Jan 2003 00:29:34 +0100 (MET)


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

Re: bug in random


On Mon, 27 Jan 2003, Bill Allombert wrote:
> It looks like there is a nasty bug bug in random:
>
> ? p=2^128+1;sum(i=1,1000,random(p)==p-1)
> %1 = 511
>
> This bug is in both CVS and stable 2.1 versions, so is unrelated
> to the change induced by the GMP kernel :^p

Fixed [ algorithm was incorrect ].

    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/