Bill Allombert on Sun, 24 Jul 2011 00:39:46 +0200 |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: znlog() behavior |
On Wed, Jul 20, 2011 at 09:17:15PM +0200, Karim Belabas wrote: > * Max Alekseyev [2011-07-20 20:57]: > > Yet another problematic input: > > > > ? znlog(3,Mod(3,8),znorder(Mod(3,8))) > > *** at top-level: znlog(3,Mod(3,8),zno > > *** ^-------------------- > > *** znlog: not a primitive root in znlog. > > *** Break loop: type 'break' to go back to GP > > > > I would expect it to simply return 1. > > This one is a bug. Ackowledged :-) Yes. I do not understand what kind of business znlog is doing, since Fp_log works: ? install(Fp_log,GGGG) ? Fp_log(3,3,2,8) %3 = 1 It seems something in znlog assume the group is cyclic. However the general question of whether some discrete log exist in a non cyclic Z/nZ is probably harder than computing a discrete log assuming it exists. For example, does znlog(Mod(2298855537794180990195437251312444783755704421573, 59370428236762430669117195238685640183456843999797),Mod(35632422881419485197515454439741009824191527361551, 59370428236762430669117195238685640183456843999797),883849447146151864513469) exists ? Cheers, Bill.