GNOME Bugzilla – Bug 671510
GCalcTool does honor the precedence of operators
Last modified: 2012-03-07 00:28:24 UTC
I came across a bug where GCalcTool doesn't honor the precedence of the parentesis. For example: "6/2(1+2)" For the above example, the correct result is 1 and not 9. The correct steps to resolve are: 6/2(1+2) = 6/2(3) = 6/6 = 1 or 6/2(1+2) = 6/(2+4) = 6/6 = 1 The way it is solving is: 6/2(1+2) = 6/2*3 = 3*3 = 9
My bad... wrong calculations done by me. The way I was doing the original equation should be "6/(2(1+2))"