Max Alekseyev on Wed, 20 Jul 2011 20:27:33 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: znlog() behavior |
On Wed, Jul 20, 2011 at 5:35 PM, Karim Belabas <Karim.Belabas@math.u-bordeaux1.fr> wrote: > * Charles Greathouse [2011-07-20 15:54]: >> 2 is not a primitive root mod 7, so the output is undefined. > > You're basically right, the result is undefined. More precisely : Max > partially took into account that 2 is not primitive by adding the > 'znorder(Mod(2,7))' parameter. > > On the other hand > > (16:16) gp > ?? znprimroot > [...] >  The Âresult Âis Âundefined Âwhen Âx Âis Ânot Âa Âpower of g or when x is not > invertible mod N: > > > In that case, 6 is not a power of 2 mod 7, so the result is undefined. I do not understand how znprimroot() is relevant in this case. I've fulfilled the requirements of znlog() (as specified in its documentation) and expect it to produce meaningful result or trigger an error. Could you please clarify what is particularly wrong with the call: "znlog(6,Mod(2,7),znorder(Mod(2,7)))" ? Regards, Max >> On Wed, Jul 20, 2011 at 9:31 AM, Max Alekseyev <maxale@gmail.com> wrote: >> > And here is another bug, isn't it? >> > >> > ? znlog(6,Mod(2,7),znorder(Mod(2,7))) >> > %2 = 1 >> > >> > Regards, >> > Max >> > >> > On Wed, Jul 20, 2011 at 3:26 PM, Max Alekseyev <maxale@gmail.com> wrote: >> >> A different question - is the following a bug? >> >> >> >> ? znlog(0,Mod(3,4)) >> >> %1 = 1 >> >> >> >> It seems such to me. I would expect an error pop up. >> >> >> >> Regards, >> >> Max > -- > Karim Belabas, IMB (UMR 5251) Â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-bordeaux1.fr/~belabas/ > F-33405 Talence (France)    http://pari.math.u-bordeaux1.fr/ Â[PARI/GP] > ` >