Karim BELABAS on Sat, 3 Oct 1998 13:33:26 +0200 (MET DST)

 Re: Problem with ellap

```[Roland Dreier:]
> > The default algorithm used by ellap appears to produce incorrect results.
> > (The curve below is not supersingular at 5, so we know right off the bat
> > that 0 must be wrong).
> [David Kohel:]
> This problem has been around for a long time, and I always lift to
> char 0 first.  In version 2.0.alpha that I have installed, it don't
> know how to get the correct answer without doing the lift:

Indeed the equation was assumed to be given in characteristic 0 (esp. c6
and Delta were assumed to be integers). Here's a fix (apply to 2.0.11, or
wait for 2.0.12 (about one week?)).

Karim.

*** src/modules/elliptic.c.orig Mon Sep 28 14:30:36 1998
--- src/modules/elliptic.c      Sat Oct  3 13:29:37 1998
***************
*** 1782,1803 ****
}

GEN
! apell(GEN e, GEN prime)
{
checkell(e);
!   if (typ(prime)!=t_INT || signe(prime)<0)
!     err(talker,"not a prime in apell");
!   if (divise((GEN)e[12],prime))
{
!     long p = kronecker((GEN)e[11],prime);
!     switch(mod4(prime))
{
!       case 0: case 3: return stoi(-p);
!       case 1: case 2: return stoi(p);
}
}
!   if (cmpis(prime, 0x3fffffff) > 0) return apell1(e, prime);
!   return apell0(e, itos(prime));
}

/* TEMPC is the largest prime whose square is less than HIGHBIT */
--- 1782,1805 ----
}

GEN
! apell(GEN e, GEN p)
{
checkell(e);
!   if (typ(p)!=t_INT || signe(p)<0)
!     err(talker,"not a p in apell");
!   if (gdivise((GEN)e[12],p)) /* e[12] may be an intmod */
{
!     long av = avma,s;
!     GEN c6 = gmul((GEN)e[11],gmodulsg(1,p));
!     s = kronecker((GEN)c6[2],p); avma=av;
!     switch(mod4(p))
{
!       case 0: case 3: return stoi(-s);
!       case 1: case 2: return stoi(s);
}
}
!   if (cmpis(p, 0x3fffffff) > 0) return apell1(e, p);
!   return apell0(e, itos(p));
}

/* TEMPC is the largest prime whose square is less than HIGHBIT */

--
Karim Belabas                    email: Karim.Belabas@math.u-psud.fr
Dep. de Mathematiques, Bat. 425
Universite Paris-Sud             Tel: (00 33) 1 69 15 57 48
F-91405 Orsay (France)           Fax: (00 33) 1 69 15 60 19
--