Max Alekseyev on Wed, 20 Jul 2011 21:33:18 +0200


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

Re: znlog() behavior


On Wed, Jul 20, 2011 at 8:35 PM, Karim Belabas
<Karim.Belabas@math.u-bordeaux1.fr> wrote:
> * 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.

And how would I know that?

With the current behavior, I see only one option - to perform an
additional check for each output of znlog() on whether it is a
meaningful result or a random crap.
Can this task be delegated to the internals of znlog() (at least in
the case when the third argument o is specified)?

Thanks,
Max