Anonymous user
User:Coderjoe/Sandbox2: Difference between revisions
no edit summary
No edit summary |
No edit summary |
||
(One intermediate revision by the same user not shown) | |||
Line 1:
<lang parigp>compose(f,g)={
x -> f(g(x))
};▼
fcf()={
A=[x->sin(x), x->cos(x), x->x^2];
B=[x->asin(x), x->acos(x), x->sqrt(x)];
for(i=1,#A,
print(compose(A[i],B[i])(.5))
▲}
Usage note: In Pari/GP 2.4.3 the vectors can be written as
<lang parigp> A=[sin, cos, x->x^2];
B=[asin, acos, x->sqrt(x)];</lang>
▲} 0..2;</lang>
|