round and truncate in Maxima



On 10/2/06, Barton Willis <willisb at unk.edu> 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...

Agreed, let?s cut ?round and ?truncate from the docs.
We already have a simplifying floor function, right?
So it should be easy to create round and truncate.
Maybe something as simple as truncate(x) := floor(x)
and round(x) := floor(x + 1/2).

best
Robert