Karim Belabas on Fri, 07 Apr 2017 23:49:29 +0200


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

Re: Annoying typing problem


* Watson Ladd [2017-04-07 23:34]:
> Dear all,
> 
> I want to convert the output of rnfdisc(K, pol)[2] into an element of K.

What do you call "convert into an element of K", it already is an
element of K (various forms are possible, as you mention)

> If it was always a vector, this would be easy, the same as if it
> was always a polmod or integer. But sadly it is sometimes one and
> sometimes the other. I have searched the manual and found nothing that
> works.

Wild guess: would

  nfbasistoalg(K, rnfdisc(K, pol)[2])

suit your needs ?

> This would be an easy function to write if I could tell what
> type rnfdisc(K, pol)[2] has, but there is no function for that either.

Maybe type() ?

Cheers,

    K.B.
--
Karim Belabas, IMB (UMR 5251)  Tel: (+33) (0)5 40 00 26 17
Universite de Bordeaux         Fax: (+33) (0)5 40 00 21 23
351, cours de la Liberation    http://www.math.u-bordeaux.fr/~kbelabas/
F-33405 Talence (France)       http://pari.math.u-bordeaux.fr/  [PARI/GP]
`