[Maxima] Configuring Maxima output as an improper fraction?
Stavros Macrakis
macrakis at alum.mit.edu
Fri Jan 30 11:35:13 CST 2009
On Fri, Jan 30, 2009 at 11:27 AM, van Nek <van.nek at arcor.de> wrote:
> ...If you really want to print the "+" here is a quick hack:
>
> (%i6) :lisp(defun $unsimplified_plus (a b) `((mplus simp) ,b ,a))
> (%i6) f(x):= unsimplified_plus(floor(x), mod(x,1))$
Be aware that any further arithmetic with the results of
unsimplified_plus may not be fully simplified. For example,
f(-3/2)+f(3/2) => 1 - 2 + 1, not zero.
> This unsimplified "+" can be reevaluated by two single quotes:
Though two single quotes work in this case, more generally if you want
an expression resimplified, you should use expand(expr,1,1). You may
find it convenient to define resimplify(expr):=expand(expr,1,1)$
-s
-s
More information about the Maxima
mailing list