Subject: minimal maxima function def to use mfuncall?
From: Rupert Swarbrick
Date: Wed, 18 Apr 2012 00:49:54 +0100
"Edwin Woollett" <woollett at charter.net> writes:
> What is the minimum amount of preparation one
> must do in defining a maxima function using :=
> to be able to use it with mfuncall?
> ---------------------------
> (%i1) :lisp (mfuncall '$sin '1.570796)
> 0.9999999999999466
>
> (%i1) f(x) := x^2$
>
> (%i2) :lisp (mfuncall 'f '3)
> ((F SIMP) 3)
>
> (%i2) --------------------------
> Ted Woollett
Just one more character :-)
Maxima 5.26.0_43_gc6e4bdc_dirty http://maxima.sourceforge.net
using Lisp SBCL 1.0.56.0.debian
Distributed under the GNU Public License. See the file COPYING.
Dedicated to the memory of William Schelter.
The function bug_report() provides bug reporting information.
(%i1) f(x) := x^2;
2
(%o1) f(x) := x
(%i2) :lisp (mfuncall '$f 3)
9
(%i2)
(And note that you don't need to quote the three)
Rupert
-------------- next part --------------
A non-text attachment was scrubbed...
Name: not available
Type: application/pgp-signature
Size: 315 bytes
Desc: not available
URL: <http://www.math.utexas.edu/pipermail/maxima/attachments/20120418/d0f333cd/attachment.pgp>