Karim BELABAS on Wed, 12 Mar 2003 18:32:08 +0100 (MET)


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

Re: subst()


On Tue, 11 Mar 2003, Igor Schein wrote:
> I remember seeing a recent subst() discussion, which I wasn't paying
> attention to.  Now I see this behavior, which I don't like at all:
>
> ? p=x^2-x-1;
> ? \y
>    simplify = 0 (off)
> ? type(subst(subst(p,x^2,x),x,x^2))
> "t_INT"
>
> I don't see how a transformation from a polynomial to an intereger can
> be justified, but I'd be glad if someone could make sense out of it.

(18:30) gp > p = x^2 - x - 1;
(18:30) gp > subst(p,x^2,x)
%2 = -1

What's wrong with this ? [ x^2 - x - 1 --> (x - x) - 1 = -1 ]

    Karim.
-- 
Karim Belabas                     Tel: (+33) (0)1 69 15 57 48
Dép. de Mathématiques, Bât. 425   Fax: (+33) (0)1 69 15 60 19
Université Paris-Sud              http://www.math.u-psud.fr/~belabas/
F-91405 Orsay (France)            http://www.parigp-home.de/  [PARI/GP]