Karim Belabas on Tue, 02 Aug 2011 03:14:40 +0200


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

Re: znlog() behavior


* Max Alekseyev [2011-07-31 20:05]:
> On Mon, Jul 25, 2011 at 2:22 AM, Karim Belabas
> <Karim.Belabas@math.u-bordeaux1.fr> wrote:
> > * Bill Allombert [2011-07-24 00:11]:
> >> On Wed, Jul 20, 2011 at 03:31:53PM +0200, Max Alekseyev wrote:
> >> > And here is another bug, isn't it?
> >> >
> >> > ? znlog(6,Mod(2,7),znorder(Mod(2,7)))
> >> > %2 = 1
> >>
> >> Sort of. (The code actually returns 3\2, see the attached patch which fix this issue).
> >> The problem is that there is no interfaces for reporting "no solution".
> >
> > I have implemented one in current svn: return the "impossible value" []
> > if there are no solution (same convention as in bestappr(), for instance).
> 
> Thank you for the fix.
> However in the following example it still returns garbage:
> 
> ? znlog(7,Mod(3,8),znorder(Mod(3,8)))
> %1 = 1

I fixed this particular problem and a number of related ones in svn 
[ always in the "no solution" case, previously "undefined behaviour" ],
and added a number of regression tests in our suite.

Is the behaviour now satisfactory ?

Thanks !

    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]
`