[back] [prev] [next] [index] [root]
Eval
Evaluates a polynomial at a value.
Syntax:
y := Eval(f, s);
Description:
This function assumes that the arithmetic with elements of
the coefficient ring of the polynomial algebra of f and s
is defined.
Example:
First we create a polynomial (over Z):
kash> f := x^2+2*x+1;
x^2 + 2*x + 1
Example:
Now we want to evalute it at 2 and \pi:
kash> Eval(f, 2);
9
kash> Eval(f, pi);
17.15278970826894509575977776643515690370803820599
Example:
Finally, we want to substitute x by x+1:
kash> Eval(f, x+1);
> x^2 + 4*x + 4
<- back[back] [prev] [next] [index] [root]