__abs__
compute absolute value of Expression
__ceil__
compute ceiling of Expression
__floor__
compute floor of Expression
__neg__
compute negation of Expression
__round__
compute rounded value of Expression
__trunc__
compute truncated value of Expression
Calling Sequence
Parameters
Description
Examples
x.__abs__()
abs(x)
x.__ceil__()
ceil(x)
x.__floor__()
floor(x)
x.__neg__()
neg(x)
x.__round__()
round(x)
x.__trunc__()
trunc(x)
x
-
Expression object
__abs__ function returns the absolute value of the Expression x.
This function can also be called by simply entering abs(x).
__ceil__ function returns the ceiling of the Expression x.
This function can also be called by simply entering ceil(x).
__floor__ function returns the floor of the Expression x.
This function can also be called by simply entering floor(x).
__neg__ function negates the Expression x.
This function can also be called by simply entering neg(x).
__round__ function rounds the Expression x.
This function can also be called by simply entering round(x).
__trunc__ function truncates the Expression x.
This function can also be called by simply entering trunc(x).
The following interactive session illustrates the use of these operators:
>>> import maple
>>> import maple.namespace
>>> expr = maple.execute('-1 * Pi:');
>>> # It is most natural to use these functions in prefix form without underscores
>>> abs(expr)
Pi
>>> ceil(expr)
-3
>>> floor(expr)
-4
>>> neg(expr)
>>> round(expr)
>>> trunc(expr)
>>> # They may however also be used with the expr.methodName syntax
>>> expr.__abs__()
>>> expr.__ceil__()
>>> expr.__floor__()
>>> expr.__neg__()
>>> expr.__round__()
>>> expr.__trunc__()
See Also
OpenMaple
OpenMaple/Python/API
OpenMaple/Python/Expression
Download Help Document