Issue 20545 - Calculation error in unary negation of percentage value
Summary: Calculation error in unary negation of percentage value
Status: CLOSED FIXED
Alias: None
Product: Calc
Classification: Application
Component: code (show other issues)
Version: OOo 1.1 RC4
Hardware: All All
: P3 Trivial (vote)
Target Milestone: ---
Assignee: frank
QA Contact: issues@sc
URL:
Keywords:
Depends on:
Blocks:
 
Reported: 2003-10-01 14:23 UTC by marguskaasik
Modified: 2013-08-07 15:15 UTC (History)
1 user (show)

See Also:
Issue Type: DEFECT
Latest Confirmation in: ---
Developer Difficulty: ---


Attachments

Note You need to log in before you can comment on or make changes to this issue.
Description marguskaasik 2003-10-01 14:23:26 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.
Comment 1 frank 2003-10-01 15:31:22 UTC
Hi Eike,

it seems that we ignore the BODMAS rules 'Brackets, Over, Division,
Multiplication, Addition, Subtraction) in this case.

Frank
Comment 2 ooo 2003-10-01 16:00:52 UTC
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.
Comment 3 oc 2003-10-08 13:55:35 UTC
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
Comment 4 thorsten.ziehm 2004-03-10 08:59:29 UTC
Because of limited resources for OOo1.1.2, we have decided to fix this problem
in OOo2.0. I changed the target.
Comment 5 ooo 2004-06-01 15:23:05 UTC
Priority should had been lowered to P3 six months ago (see comments) but it
seems I missed the field.
Comment 6 ooo 2004-09-22 12:54:19 UTC
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
Comment 7 ooo 2004-10-04 13:33:16 UTC
=3%^4% doesn't work, results in 3% instead of 0.8691
Comment 8 ooo 2004-10-04 21:04:35 UTC
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
Comment 9 ooo 2004-10-12 15:16:53 UTC
Reopen to reassign.
Comment 10 ooo 2004-10-12 15:17:13 UTC
Reassign to QA.
Comment 11 ooo 2004-10-12 15:17:30 UTC
Restore status.
Comment 12 frank 2004-10-18 14:49:19 UTC
Found fixed in cws Calc23 using Solaris, Windows and Linux build
Comment 13 frank 2004-11-23 14:03:01 UTC
Found fixed on Master src680m62 using Linux, Solaris and Windows Build