Xavier Roblot on Thu, 18 Nov 1999 16:52:47 -0500


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

Re: nfdisc() bug


Igor Schein wrote:

> ? nfdisc(x^3 + 69*x^2 - 60*x + 44)
>   ***   impossible inverse modulo: Mod(3, 729).

This bug was due to a typo in base2.c. It can be fix using the following
patch, I have also updated the cvs version.

Xavier Roblot


Index: src/basemath/base2.c
===================================================================
RCS file: /home/megrez/cvsroot/pari/src/basemath/base2.c,v
retrieving revision 1.11
diff -c -r1.11 base2.c
*** src/basemath/base2.c        1999/11/15 14:59:07     1.11
--- src/basemath/base2.c        1999/11/18 21:46:34
***************
*** 1627,1637 ****
        if (!kapp)
        {
          kapp = ginvmod(nu, chi);
!         kapp = redelt(kapp, pmr, pmr);
          kapp = gmodulcp(kapp, chi);
        }
        gamm = lift(gmul(gamm, gpowgs(kapp, er)));
!       gamm = redelt(gamm, p, pmr);
        }
  
        if (DEBUGLEVEL >= 6)
--- 1627,1637 ----
        if (!kapp)
        {
          kapp = ginvmod(nu, chi);
!         kapp = redelt(kapp, pmr, pmf);
          kapp = gmodulcp(kapp, chi);
        }
        gamm = lift(gmul(gamm, gpowgs(kapp, er)));
!       gamm = redelt(gamm, p, pmf);
        }
  
        if (DEBUGLEVEL >= 6)