Apache OpenOffice (AOO) Bugzilla – Issue 20545
Calculation error in unary negation of percentage value
Last modified: 2013-08-07 15:15:02 UTC
If you enter the following formula =-2%*0+1%, then answer should be 1%, but OO gives -200%. The problem seems to be that if the first number is negative (-2%) then the formula is ignored completely starting from % sign. Therefore OO gets the answer 2 or 200% in the example. Sorry, haven't tried RC5 yet.
Hi Eike, it seems that we ignore the BODMAS rules 'Brackets, Over, Division, Multiplication, Addition, Subtraction) in this case. Frank
Why so complicated? Just try =-2% The issue occurs only with direct unary negation of the percentage value, =-(2%) or =0-2% are correctly calculated. Adjusted summary line. No justification for priority P2, lowering to standard P3.
According to the roadmap of OpenOffice.org 1.1 (http://tools.openoffice.org/releases/OpenOffice_org_1_x.html) this issue has been scheduled for 1.1.2. Additional this fix is very risky and could have side effects
Because of limited resources for OOo1.1.2, we have decided to fix this problem in OOo2.0. I changed the target.
Priority should had been lowered to P3 six months ago (see comments) but it seems I missed the field.
On branch cws_src680_calc23: sc/source/core/tool/compiler.cxx 1.49.128.1 sc/source/filter/excel/exccomp.cxx 1.34.4.1
=3%^4% doesn't work, results in 3% instead of 0.8691
On branch cws_src680_calc23: sc/source/core/tool/compiler.cxx 1.49.128.3 sc/source/filter/excel/exccomp.cxx 1.34.4.2 sc/source/core/tool/interpr1.cxx 1.30.4.3
Reopen to reassign.
Reassign to QA.
Restore status.
Found fixed in cws Calc23 using Solaris, Windows and Linux build
Found fixed on Master src680m62 using Linux, Solaris and Windows Build