Anonymous user
Function composition: Difference between revisions
Added Mathcad example.
(Added Mathcad example.) |
|||
Line 1,790:
CheckIt
</lang>
=={{header|Mathcad}}==
Mathcad is a non-text-based programming environment. The expressions below are an approximations of the way that they are entered (and) displayed on a Mathcad worksheet. The worksheet is available at xxx_tbd_xxx
This particular version of Function Composition was created in Mathcad Prime Express 7.0, a free version of Mathcad Prime 7.0 with restrictions (such as no programming or symbolics). All Prime Express numbers are complex. There is a recursion depth limit of about 4,500.
compose(f,g,x):=f(g(x))
cube(x):=x<sup>3</sup> cuberoot(x):=x<sup>1/3</sup>
funlist:=[sin cos cube]<sup>T</sup> invlist:=[asin acos cuberoot]<sup>T</sup>
invfunlist(x):= {vectorize}compose(invlist,funlist,x){/vectorize}
x:= 0.5
invfunlist(x)= {results of evaluation appears here) invfunlist([x √2 3]<sup>T</sup>)= {results)
apply(f,x):=f(x) apply(f,x):={vectorize}apply(f,x){/vectorize}
apply(funlist,x)= {results} + ... several more examples
=={{header|Mathematica}} / {{header|Wolfram Language}}==
|