You might play with something like this. It works for
a few simple tests, but ...
--showme.lisp-------
(defmspec $show (x)
`((mequal simp) ,(cadr x) ,(mfuncall '$ev (cadr x) '$nouns)))
--------------------
(%i1) display2d : false$
(%i2) load("showme.lisp")$
(%i3) show(sqrt(4));
(%o3) SQRT(4) = 2
(%i4) show(5!);
(%o4) 5! = 120
(%i5) show('diff(y,x));
(%o5) 'DIFF(y,x) = 0
(%i6) show('integrate(x,x));
(%o6) 'INTEGRATE(x,x) = x^2/2
(%i7) show(6/2);
(%o7) 6/2 = 3
(%i8)
Barton
-----maxima-admin@math.utexas.edu wrote: -----
>To: maxima@math.utexas.edu
>From: "Poul Riis"
>Sent by: maxima-admin@math.utexas.edu
>Date: 03/27/2005 05:09PM
>Subject: Problem and result in one line
>
>If I define
>integ(f,x):='integrate(f,x)=integrate(f,x);
>I can type
>integ(x^2,x) and get the problem and the result
>written in one line.
>How can I do something similar with simple
>reductions, for instance
>6/3=2
>or
>sqrt(4)=2
>?
>
>Yours,
>Poul Riis
>
>_______________________________________________
>Maxima mailing list
>Maxima@www.math.utexas.edu
>http://www.math.utexas.edu/mailman/listinfo/maxim
>a
>