#842 plot2d plotting fcn by name fails on many built-in functions

closed
nobody
Lisp Core (471)
5
2006-03-28
2005-12-19
No

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
"Undefined function".

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]);

succeeds.

Discussion

  • Robert Dodier

    Robert Dodier - 2006-03-28
    • status: open --> closed
     
  • Robert Dodier

    Robert Dodier - 2006-03-28

    Logged In: YES
    user_id=501686

    Fixed by r1.62 of src/plot.lisp -- COERCE-FLOAT-FUN extended
    to catch simplifying functions, DEFMSPEC, Maxima macros, and
    operator names.

     

Log in to post a comment.

Get latest updates about Open Source Projects, Conferences and News.

Sign up for the SourceForge newsletter:





No, thanks