eval
evaluate an Expression
Calling Sequence
Parameters
Description
Examples
e.eval()
e.eval(n)
e.eval(x==a)
e.eval(eqns)
e
-
Expression object
n
positive integer
x
Name object
eqns
list or set of Expressions corresponding to equations
eval evaluates the Expression e using the Maple eval function and returns a numeric value or a new Expression object.
The calling sequence e.eval() corresponds to the one-argument calling sequence for eval, while all other calling sequences correspond to two-argument invocations of eval.
The common use of evaluating an expression at a point may be used with e.eval(x==a).
The following interactive session illustrates the use of these operators:
>>> import maple
>>> import maple.namespace
>>> expr = maple.execute( 'x^2 + 2;' );
>>> # Evaluate the expression at the point x = 2
>>> expr.eval( maple.namespace.x == 2 )
6
>>> # Replace the symbol x with y
>>> expr.eval( maple.namespace.x == maple.namespace.y )
y^2+2
See Also
OpenMaple
OpenMaple/Python/API
OpenMaple/Python/Expression
Download Help Document