Open tigran123 opened 3 years ago
The reason why I introduced that parenthesis was that in an output like
sum k + L
I never found a good way to visually discern if the L is part of the sum or if it is added to the result of the sum.
Yes, I understand that. But if you check Maxima on Android 3.2.1 it does this intelligently, i.e. for things like sum(k,k,1,n)
it shows no parenthesis, but for sum(k+k^2,k,1,n)
it puts them around the expression. Can't you implement the same logic in wxMaxima somehow?
For what it's worth, the right way to handle parentheses is probably to assign RBP and LBP properties (right binding power and left binding power, i.e. operator precedence) for sum
. On first glance, I'm guessing the binding power (not sure if left or right) for sum
needs to be lower than for =
.
I see that Maxima itself doesn't display the above expression with any parentheses. Maybe Maxima needs them too -- I don't know right now.
WxMaxima assigns it's own binding powers to some symbols which I believe to be dangerous as of Maxima changes it's binding powers that might cause consistency problems.
Maxima normally displays the sum on the terminal like this:
However, wxMaxima inserts parentheses around
k
above, i.e. shows(k)
inside the sum sign, instead of justk
.