Karim BELABAS on Wed, 21 Jun 2000 10:53:25 +0200 (MET DST)


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

Re: rnfisnorm


[Annegret Weng:]
> I have a problem with the function "rnfisnorm". It seems that I do not
> know how to work with it. 
> I wrote a C++-program using Pari (see below) but I get an error. 
> 
[...]
>
>     GEN element=algtobasis(bnf,stoi(p));
>     output(rnfisnorm(bnf,ext,element,100,prec));

The rnfisnorm doesn't properly handle its arguments (wrt to the general
semantics of nf* functions): it only accept elements in the form of
polynomials (or polmods).    [This is now corrected in the CVS archive].

Replace 

      GEN element=algtobasis(bnf,stoi(p));

by
      GEN element=stoi(p);
or
      GEN element=basistoalg(bnf,stoi(p));

I added your example in the documentation for rnfisnorm:

   bnf = bnfinit(y^3 + y^2 - 2*y - 1);
   p = x^2 + Mod(y^2 + 2*y + 1, bnf.pol);
   rnf = rnfequation(bnf,p,1);
   ext = [p, rnf[2], bnfinit(rnf[1])];
   rnfisnorm(bnf,ext,17, 1)

Cheers,

  Karim.
__
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
--
PARI/GP Home Page: http://www.parigp-home.de/