round and truncate in Maxima



It seems to me that a brief synopsis on common lisp functions on (at least)
integers and floats would be useful, since these questions come up on a 
regular basis.

There could be several rounds -- round to nearest even, round to/away 
from 0.
They also work for common lisp rationals, but Maxima doesn't use CL 
ratio type,
a relic of maclisp.

As for bigfloat roundings, I think there are function in the float.lisp 
file that
are called bfround and bftrunc.
RJF

RJF


Barton Willis wrote:

>The functions ?round and ?truncate should be removed from the Maxima user 
>documentation.
>They are just Common Lisp functions, so they do not work for anything 
>except integers and
>double floats.  A fun project would be to define functions round and 
>truncate...
>
>Barton
>
>maxima-bounces at math.utexas.edu wrote on 10/02/2006 01:28:53 PM:
>
>  
>
>>Hello,
>>
>>in the manual I found documented the Lisp functions ?round and ?
>>truncate  (Floating.texi).
>>Does this make sense? These functions can't work with Bigfloats.
>>
>>We have the Maxima functions floor, fix (entier) and ceiling. 
>>Wouldn't it be better to define round and truncate with the help of 
>>floor and ceiling?
>>
>>Volker van Nek
>>_______________________________________________
>>Maxima mailing list
>>Maxima at math.utexas.edu
>>http://www.math.utexas.edu/mailman/listinfo/maxima
>>    
>>
>_______________________________________________
>Maxima mailing list
>Maxima at math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxima
>  
>