Efficient Lisp functions -- using results of symbolic calculations numerically
Subject: Efficient Lisp functions -- using results of symbolic calculations numerically
From: Bruno Daniel
Date: Fri, 31 Aug 2007 22:35:18 +0200
> We do. See the translate and compile commands.
Thanks for your answer. I suppose the translate and compile commands are not
quite the same, since they still work on expression datastructures and
evaluate them, don't they? The lambda functions created by lambda-by-maxima,
on the other hand, work purely numerically on double-floats and don't deal
with symbolic expressions any more; they rather _are_ expressions:
#'(LAMBDA (X)
(DECLARE (TYPE DOUBLE-FLOAT X) (VALUES DOUBLE-FLOAT)
(OPTIMIZE (SPEED 3) (SPACE 0) (SAFETY 0) (DEBUG 0)))
(+ (* 2 (COS (EXPT X 2))) (- (* (/ (EXPT X 2)) (SIN (EXPT X 2))))))
Correct me if I'm wrong.
Best regards
Bruno Daniel