Walter Neumann on Wed, 12 Mar 2003 14:27:09 -0500 (EST) |
[Date Prev] [Date Next] [Thread Prev] [Thread Next] [Date Index] [Thread Index]
Re: subst() |
subst(p,x^2,x) may be useless, but subst(p,x^2,y) is not. On Wed, 12 Mar 2003, Igor Schein wrote: > On Wed, Mar 12, 2003 at 06:32:08PM +0100, Karim BELABAS wrote: > > 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 ] > > As far as I'm concerned, the above is a correct but also a useless > operations. I don't see where anyone would use it. For me an error > would be more useful, detecting that I'm doing something wrong by > mistake. > > Do other CAS have anything similar to subst(,x^n,x)? > > Igor >