Karim Belabas on Sat, 19 May 2007 03:27:30 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: square root modulo power of prime |
* Karim Belabas [2007-05-18 12:12]: > * Max Alekseyev [2007-05-18 04:13]: > > Similar question about znlog() function. Why it does not work modulo > > power of prime? [...] > > Again, what is the best workaround for that? > > 1) znlog for p-adics (p odd) should work but doesn't [ I'll fix that ] Hum. Speaking of consistency, znprimroot(p^k) returns a t_INTMOD; which should also be accepted by znlog(). In current CVS, znlog now accepts t_PADIC and more general t_INTMOD arguments. See the documentation for examples. NB: znprimroot(N) no longer checks reliably whether (Z/NZ)^* is cyclic (removed compositeness test). This makes it much faster for non-prime inputs. E.g. znprimroot(nextprime(10^20)^1000) requires 12ms instead of 8mn. Cheers, K.B. -- Karim Belabas Tel: (+33) (0)5 40 00 26 17 Universite Bordeaux 1 Fax: (+33) (0)5 40 00 69 50 351, cours de la Liberation http://www.math.u-bordeaux.fr/~belabas/ F-33405 Talence (France) http://pari.math.u-bordeaux.fr/ [PARI/GP] `