Created attachment 93398 [details] A spreadsheet Which shows the expected and wrong behaviour while evaluating the expressions. Problem description: Whenever I put "=-(5)^2" in any cell (without quotes) and put enter, it calculates the value as 25, which should be -25 instead. It appears that it takes square of -5 instead of 5. If you try =-(5)^3 then it calculates -125, which is trivially correct. The problem encountered when I was generating a column of y values for given x range, for y = 10*exp(-(x-11)^2/100) Steps to reproduce: 1. .... Open Libreoffice Calc 2. ....Put "=-(5)^2" in any cell (without quotes) and press enter. 3. ....You should expect a value -25, but it shows 25 instead. Current behavior: -(5)^2 >>> 25 Expected behavior: -(5)^2 >>> -25 Operating System: Ubuntu Version: 4.2.0.4 release
Hi. The precedence of Excel operators is given in ""http://office.microsoft.com/en-us/excel-help/calculation-operators-and-precedence-HP010342223.aspx". Same for LibreOffice CALC. See "http://lpsolit.wordpress.com/2011/05/17/excel-openoffice-libreoffice-or-when-developers-think-rules-do-not-apply-to-them/". OK, questionnable (and questionned!) for -4*2. But it is too late to change. There are worst precedence tables in the world of data processing (APL...). Not A Bug.
*** Bug 142451 has been marked as a duplicate of this bug. ***
*** Bug 106921 has been marked as a duplicate of this bug. ***