newbie question: plotting signum(x) doesn't work



Hi,

Could anyone please explain why this works just fine:

plot2d(if x<0 then -1 else if x>0 then 1 else
0,[x,-2,2],[y,-2,2]);

but plotting the builtin signum function

plot2d(signum(x),[x,-2,2],[y,-2,2]);

causes the following error message:
--------------------------------
can't use empty string as operand of "-"
can't use empty string as operand of "-"
    while executing
"expr {$min - .5}"
    (procedure "plot2dRangesToRadius" line 8)
    invoked from within
"plot2dRangesToRadius {} {} {-xradius 2.0 -xcenter
0.0}"
    ("eval" body line 1)
    invoked from within
"eval plot2dRangesToRadius $ranges"
    (procedure "replot2d" line 28)
    invoked from within
"replot2d $win"
    (procedure "plot2d" line 4)
    invoked from within
"plot2d -data {plot2d  {xrange -2. 2.} {xaxislabel
"x"} {yaxislabel "signum(x)"}
 {nolines 0} {plotpoints 0} {color blue}
 {xversusy
}} -windowname .ma..."
    ("eval" body line 1)
    invoked from within
"eval $command"
    (procedure "doShowPlot" line 14)
    invoked from within
"doShowPlot $win $data"
    (procedure "maximaFilter" line 46)
    invoked from within
"maximaFilter .maxima.text sock156"
------------------------


Thanks,

Ashot



       
____________________________________________________________________________________
Boardwalk for $500? In 2007? Ha! Play Monopoly Here and Now (it's updated for today's economy) at Yahoo! Games.
http://get.games.yahoo.com/proddesc?gamekey=monopolyherenow