[sage-support] Re: polynomial evaluation

2007-03-08 Thread William Stein
On 3/8/07, Kyle Schalm <[EMAIL PROTECTED]> wrote: > > That said, I would love to add a function that basically does the above > > to SAGE, but it's unclear what the notation would even be. One idea > > is this: > >sage: f(w=3) > > in my actual situation, i have something like > > R1. = QQ

[sage-support] Re: polynomial evaluation

2007-03-08 Thread Kyle Schalm
> > The above code is a good idea, but there would be efficiency > issues. It would be better to do this (see the ev function below). > > sage: R1. = QQ['w'] > sage: R2. = R1['z'] > sage: f = w*z + (1-w)*z^3 + 3 > sage: def ev(f, a): > ...return f.parent()([c(a) for c in f.list()]) > sage: e

[sage-support] Re: polynomial evaluation

2007-03-08 Thread William Stein
On 3/7/07, Kyle Schalm <[EMAIL PROTECTED]> wrote: > > On 3/7/07, Kyle Schalm <[EMAIL PROTECTED]> wrote: > >> . the question is: how do i evaluate w while leaving z untouched? > >> (i actually want to do this when R1 is a multivariable ring, but i imagine > >> it works the same way.) > >> > > > > C

[sage-support] Re: polynomial evaluation

2007-03-07 Thread Kyle Schalm
> > On 3/7/07, Kyle Schalm <[EMAIL PROTECTED]> wrote: > >> . the question is: how do i evaluate w while leaving z untouched? >> (i actually want to do this when R1 is a multivariable ring, but i imagine >> it works the same way.) >> > > Can't you just work with all the variables together, like:

[sage-support] Re: polynomial evaluation

2007-03-07 Thread Luis Finotti
On 3/7/07, Kyle Schalm <[EMAIL PROTECTED]> wrote: > . the question is: how do i evaluate w while leaving z untouched? > (i actually want to do this when R1 is a multivariable ring, but i imagine > it works the same way.) > Can't you just work with all the variables together, like: sage: P.=QQ['