Karim BELABAS on Fri, 19 Mar 1999 18:14:57 +0100 (MET)

```[Igor:]
> looks like this function is new and haven't been thoroughly tested:
>
> ? nfdisc(x^2-x-50)
> 201
>   ***   incorrect archimedean component in zidealstarinit.

Bad input. Output of idealprimedec is a vector of two prime ideals,
which is thought to be an idele at first (vector of two elements, the first
being a prime ideal, the second being the "archimedean component").

The archimedean component is then analyzed more thouroughly raising an error.

>   ***   bus error: bug in GP (please report).
>
>   ***   not an integer argument in an arithmetic function

Patch following.

> Also, manual says that the second argument of quadray() is a
> conductor f.  I think it's also useful to mention, of what shape
> the conductor can assume (a prime, a 5-component vector representing a
> prime ideal, etc. )

It's (what PARI calls) an "idele", see ?? bnr (I'm adding "ideal" and "idele"

Karim.

*** src/basemath/base3.c.orig   Wed Mar 17 09:03:14 1999
--- src/basemath/base3.c        Fri Mar 19 18:07:11 1999
***************
*** 1036,1045 ****
if (isnfscalar(x))
{
if (gcmp1(x) || egalii((GEN)pr[1], gdeux)) { avma = av; return gzero; }
!     if (egalii((GEN)x[1], p1)) return gerepileuptoint(av,shifti(p1,-1));
!     v = gpowgs(p,f-1); g0 = element_powmodpr(nf,g0,v,prhall);
!     return gerepileuptoint(av, mulii(v, Fp_shanks((GEN)x[1],(GEN)g0[1],p)));
}
p1 = racine(p1);
if (cmpis(p1,LGBITS) >= 0) err(talker,"module too large in nfshanks");
--- 1036,1047 ----
if (isnfscalar(x))
{
+     x = (GEN)x[1];
if (gcmp1(x) || egalii((GEN)pr[1], gdeux)) { avma = av; return gzero; }
!     if (egalii(x, p1)) return gerepileuptoint(av,shifti(p1,-1));
!     g0 = lift_intern((GEN)element_powmodpr(nf,g0,v,prhall)[1]);
!     return gerepileuptoint(av, mulii(v, Fp_shanks(x,g0,p)));
}
p1 = racine(p1);
if (cmpis(p1,LGBITS) >= 0) err(talker,"module too large in nfshanks");
(18:09)(*1) orkay-karim > odiff src/basemath/base4.c.orig
*** src/basemath/base4.c.orig   Fri Mar  5 08:51:38 1999
--- src/basemath/base4.c        Fri Mar 19 17:51:40 1999
***************
*** 104,109 ****
--- 104,110 ----
prime_to_ideal(GEN nf, GEN vp)
{
long av=avma;
+   if (typ(vp) == t_INT) return gscalmat(vp, lgef(nf[1])-3);
return gerepileupto(av, prime_to_ideal_aux(nf,vp));
}

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