Subject: Correcting priority issues in mactex.lisp
From: Richard Fateman
Date: Tue, 26 May 2009 09:19:01 -0700
Robert Dodier wrote:
> On Sun, May 24, 2009 at 9:40 AM, Yasuaki Honda <yhonda at mac.com> wrote:
>
>
>> 1) h*cos(a) is displayed as "cos a h"
>> This is confusing and I want to change the priority of trig functions
>> to 119 (rather than today's 130) so that the output looks like
>> "(cos a) h".
>>
This may be clearer, but so is cos(a)*h. Note that cos a could
mean cos*a.
also, (a*b)+c is clearer than a*b+c.
and (a/b)/c etc etc.
If you can, look at the Mathematica discussion of the variants on
display. They concede that traditional mathematical notation is
ambiguous and you should not use it if there are issues like this.
If we start putting in extra parentheses each time someone claims to be
confused, it may not end here.
Time for a flag? Perhaps something like add_extra_parens: all or
some or none {situation now}.
>
> OK by me.
>
>
>> I think b[n]+a[n] should be parenthed in sum. The same thing
>> happens in product(), too. I want to modify tex-sum() so that the
>> priority of mplus and %sum are considered.
>>
>
> OK by me.
>
> Those complaining about this change should note that, in fact,
> the 2-d display already makes such parentheses, and it has for
> a long time (at least since 5.9.2).
not what I see. I see ( sum(a[n]+b[n],n,1,k) ) + ....
not sum( ( a[n]+b[n] ) , n,1,k) + ...
if that is clear :)
> The proposed change just
> makes the TeX output match the 2-d display, which nobody
> complained about.
>
> FWIW
>
> Robert Dodier
> _______________________________________________
> Maxima mailing list
> Maxima at math.utexas.edu
> http://www.math.utexas.edu/mailman/listinfo/maxima
>