plot2d (fn_name, ...) works if the function in question
is defined in Maxima by := or define, or in Lisp by
DEFUN or DEFMFUN. However, if it is defined by DEFMSPEC
or it is a simplifying function, plot2d complains
COERCE-FLOAT-FUN in src/plot.lisp checks FBOUNDP
(catches DEFUN/DEFMFUN) and looks for the MEXPR
property (catches :=/define).
Failing to catch DEFMSPEC isn't a big deal (although
for consistency we should do it), but not catching
simplifying functions is a problem. For example
plot2d (sin, [x, 0, %pi])
fails w/ "Undefined function" although
my_sin(x) := sin(x);
plot2d (my_sin, [x, 0, %pi]);
Log in to post a comment.