Karim Belabas on Sun, 17 Jun 2012 19:52:29 +0200


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

Re: Lifting a quadgen


* Dirk Laurie [2012-06-17 19:48]:
> Consider the following GP session.
> 
> ? phi=quadgen(5)
> %1 = w
> ? L(n)=phi^n+(-1/phi)^n
> %2 = (n)->phi^n+(-1/phi)^n
> ? L6=L(6)
> %3 = 18
> ? type(L6)
> %4 = "t_QUAD"
> ? type(%3)
> %5 = "t_INT"
> 
> Two questions.
> 
> - Why are %3 and L6 of different type?

Automatic simplification is on [ applied to result history only, so %3
and not L6 ]

See default(simplify,...). 

> - Can one lift L6 to t_INT except by ugly kludges like
>    floor(1.*L6)?

L6 = simplify(L6)

Cheers,

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