On Sun, Jun 28, 2009 at 2:44 PM, Douglas A Edmunds<dae at douglasedmunds.com>
wrote:
> I am using wxMaxima. I find that if simp:false then
> I can get a 'natural display' of the entry. The order
> of variables is not jumbled, and values (such as 25^2) remain
> as 25^2.
>
> I find this very helpful to verify the accuracy of the entry.
This sounds like a reasonable goal. To make it work, you will need to both
turn off simplification and not try to evaluate the expression with
simplification off. For example, you could define something like this:
verifying_read(varname) :=
block( [simp:false, display2d:true, val],
val: readonly(concat("Value of ",varname,"? ")),
print("Setting ",varname," to:"),
print(val),
print("which evaluates and simplifies to:"),
simp:true,
val: ev(val),
print(val),
varname :: val );
(%i25) a: 23$ <<< setting parameters
(%i26) b: 55$
(%i27) verifying_read('q); <<< quoting because q is the literal name of
the variable
Value of q?
a*x^3-b/x+sin(3/2*%pi); <<< user input
Setting q to:
3 b 3
a x - - + sin(- %pi) <<< unsimplified, unevaluated
x 2
which evaluates and simplifies to:
3 55
23 x - -- - 1 <<< simplified, evaluated
x
Is this what you had in mind?
-s
>
> Apparently simp:false won't always work.
> Is there some other alternative way to do this? I can replace
> everything with a dummy variable, (x^y; then x:25; y:2), but that
> adds a lot of steps.
>
> Doug Edmunds
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>