Thanks to Stavros for the code, but it seems that either it was uncorrectly transmitted via email, or it needs some finishing. Below is what happens after loading the code. The code as it was received in my mailer is in the attachment. -- Alexander P.S. What is the best way to plot (and deal with) functions including 'IF...THEN...ELSE' in Maxima? Is what I'm doing below just OK or it needs improvements? Which ones? (C1) g5(z1,z2):=(MODE_DECLARE(z1,FLOAT,z2,FLOAT),(IF (z2 < (3-1)) THEN (IF (z1 < (3-1)) THEN 0.5 ELSE (-(3-z1)^2*0.5 +(3-z1))) ELSE (IF (z2 > z1) THEN (3-z2)^2*0.5 ELSE z1*z2-3*z2-z1^2*0.5+3^2*0.5)))$ (C2) compile(g5)$ (C3) plot3d(ev(g5(z1,z2),noeval),[z1,0,3],[z2,0,3])$ # # now load the code # (C4) load("plotfloatfix.lisp")$ # (C5) plot3d(ev(g5(z1,z2),noeval),[z1,0,3],[z2,0,3])$ *** - EVAL: too many arguments given to $FLOAT: ($FLOAT ($REALPART (MEVAL* '((|$g5| SIMP) |$z1| |$z2|))) 1.0) The following restarts are available: R1 = Macsyma top-level 1. Break [1]> R1 Maxima restarted. (C6) bug_report(); ------------------------------------------------------------- Maxima version: 5.9.0 Maxima build date: 15:27 11/24/2003 host type: i586-pc-linux-gnu lisp-implementation-type: CLISP lisp-implementation-version: 2.27 (released 2001-07-17) (built 3223390905) (memory 3278669292) -------------------------------------------------------------
Attached file: plotfloatfix.lisp