Plot 2D & 3D - Variables Range



>>>>> "Peter" == Peter Ulrich Kruppa  writes:

    Peter> On Sun, 23 Jan 2005, Gian Paolo Bronzetti wrote:

    >> Hi everybody,
    >> 
    >> I have been very surprised that both plot commands don't accept
    >> the limits of the variables range if they are written in fractional form:
    >> 
    >> (%i14) plot2d(2*x,[x,-5,5])$
    >> 
    >> is OK, while, if 5 -> 5/2
    >> 
    >> (%i15) plot2d(2*x,[x,-5,5/2])$
    >> 
    >> Bad Range
    >> [x,-5,5/2] must be of the form [variable,min,max]
    >> -- an error.  Quitting.  To debug this try DEBUGMODE(TRUE);
    Peter> To add some strangeness:
    Peter>  	(%i16) plot2d(2*x,[x,-5,%pi/2]);
    Peter> will work fine.

One simple solution is to replace coerce-float with the following:

  (defmacro coerce-float (x)
   `($float (meval* ,x)))

I don't understand how the original version works with %pi/2 but
doesn't work with 5/2.

Ray