Search All of the Math Forum:
Views expressed in these public forums are not endorsed by
NCTM or The Math Forum.


Mate
Posts:
389
Registered:
8/15/05


Re: Maxima  simplification/evaluation
Posted:
Feb 28, 2013 3:03 PM


On Feb 28, 6:56 am, Richard Fateman <fate...@cs.berkeley.edu> wrote: > On 2/27/2013 3:32 AM, Mate wrote: > > > In Maxima, the single quote operator ' does not > > prevent evaluation for '(2*3); this _is_ evaluated to 6. > > No, 2*3 is simplified to 6. > > > We can set > > > simpl:false; > > n : 2*3; > > that would be simp:false. > > > > > to keep n unevaluated > > no, n is unsimplified. It is evaluated though the evaluation > leaves it unchanged. > try x:2 > n:x*3 > to see that n is evaluated. > > but the function factor(6)> which also returns an unevaluated 2*3, > > no, it is marked as already simplified by the factor command. > try > factor(6); > ?print(%); > > uses some other method > > > because simp is not involved. > > Wrong again. The simplifier notices that there is a "simp" > flag on the expression, and so it is not simplified to 6. > > > Does somebody here know something about this? > > (I would be interested in a "pure Maxima" solution, without Lisp.) > > If you said what your objective was, perhaps a solution is possible. > You haven't said what you that is. > > If you want to see 2*3 displayed, you could do print("2*3"); > > While it is possible to turn the simplifier off by simp:false, > it is almost always a terrible idea. > > RJF
Thank you Richard, for clarifying all these aspects. I'd like to know how factor() displays the unsimplified results. So, what would be the definition of a function f(m,n) such that:
f(2,3) 2*3 %+1; 2*3+1 ratsimp(%); 7
Thank you. M.



