fp::expr_unapply -- create
a functional expression from an expression
Introductionfp::expr_unapply(e,x) tries to interpret
the expression e as a function in x and to
return a functional expression computing that function.
Call(s)fp::expr_unapply(e <, x...>)
Parameterse |
- | expression |
x |
- | identifier |
ReturnsA functional expression or FAIL.
Related
Functions
Detailsfp::expr_unapply views the expression e
as a function in the indeterminates x,... and tries to
return a functional expression computing that function. If
fp::expr_unapply can not find a functional expression
FAIL is returned.e found by indets are used.
Example
1Get the functional expression computing
sin(x):
>> fp::expr_unapply(sin(x), x)
sin
Example
2Get the functional expression computing
sin(x)^2+cos(x)^2:
>> fp::expr_unapply(sin(x)^2 + cos(x)^2)
2 2
cos + sin
unapply