qq.lisp has one of the few examples of using bind-tramp1$ -- let's not
throw qq.lisp away right now.
Does the proposed Maxima to Quadpack interface use bind-tramp1$?
Here is an example of using qq.lisp that possibly shows the advantage
of using bind-tramp1. This is the version of qq.lisp that Wolfgang
recently fixed; this is not the CVS version.
(C1) f(x) := block([ ],mode_declare(x,float), 1/x)$
(C2) compile(f)$
Compiling gazonk0.lsp.
End of Pass 1.
End of Pass 2.
OPTIMIZE levels: Safety=2, Space=2, Speed=2
Finished compiling gazonk0.lsp.
(C3) load("c:/MaximaCVS/maxima/share/numeric/qq.lisp")$
I believe the magic of bind-tramp1$ allows quanc8 to evaluate f without
going through meval.
(C4) trace(?meval)$
(C5) quanc8(f,1,2);
1 Enter ?MEVAL [QUANC8(f, 1, 2)]
2 Enter ?MEVAL [f]
2 Exit ?MEVAL f
2 Enter ?MEVAL [1]
2 Exit ?MEVAL 1
2 Enter ?MEVAL [2]
2 Exit ?MEVAL 2
1 Exit ?MEVAL 0.69314718056001
(D5) 0.69314718056001
An ordinary call to f gets funneled through meval (slow for pure numerical
work)
(C6) f(0.2);
1 Enter ?MEVAL [f(0.2)]
2 Enter ?MEVAL [0.2]
2 Exit ?MEVAL 0.2
1 Exit ?MEVAL 5.0
(D6) 5.0
I could be wrong about all this; let me know ...
Barton