Operator precedence of % vs ^
Declined
When typing
3*10^15 %
, I would expect to get as answer one hundredth of my input, ergo
3*10^13
But this is not what happens. Instead, GeoGebra seems to bind the "%" sign directly to the exponent "15", effectively calculating "3*10^(15%)", giving
4.237612633868
This is not at all what I would expect from above input.
This behaviour also doesn't make sense from a mathematical standpoint, where "%" means "divide by 100", so consequently it should have the same operator precendence as a division or multiplication, but instead it gets evaluated even prior to the exponentiation "^".
Suggestion: Change order precedence of "%" to the level of "*" and "/"!
Strangely enough, this faulty behaviour can't even be overruled by adding parentheses!
Actually, the easiest solution would be to simply replace each occurence of "%" by "/100" or "*0.01" before evaluating the whole string. All problems solved, no new problems introduced.
Sorry, we won't change that
Comments have been locked on this page!