Karim Belabas on Wed, 20 Jul 2011 21:15:46 +0200


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

Re: znlog() behavior


* Max Alekseyev [2011-07-20 20:27]:
> 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.

Sorry, typo :-(. What I quoted is actually the output of ??znlog ...

> 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)))" ?

6 = 2^k (mod 7) has no solution.

Cheers,

    K.B.
--
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]
`