Macaulay2 » Documentation
Packages » Macaulay2Doc > substitution and maps between rings > substitute > RingElement Sequence
next | previous | forward | backward | up | index | toc

RingElement Sequence -- evaluation of polynomials

Synopsis

Description

i1 : R = QQ[x,y,z];
i2 : f = x^3 - y^2 + 999*z;
i3 : f(10,0,0)

o3 = 1000

o3 : QQ
i4 : f(0,1,0)

o4 = -1

o4 : QQ
i5 : f(0,0,1)

o5 = 999

o5 : QQ
i6 : f(10,1,-1)

o6 = 0

o6 : QQ
i7 : x^3 * f(0,0,1)

         3
o7 = 999x

o7 : R
i8 : f(0,0,x+y+z) / 999

o8 = x + y + z

o8 : R
i9 : f(z,y,x)

      3    2
o9 = z  - y  + 999x

o9 : R
i10 : f(x,x,x)

       3    2
o10 = x  - x  + 999x

o10 : R

Note that giving fewer variables results in partial evaluation.

i11 : f(10)

         2
o11 = - y  + 999z + 1000

o11 : R
i12 : f(10,y,z)

         2
o12 = - y  + 999z + 1000

o12 : R

See also

Ways to use this method: