Bug 134398 - [LibreOfficeCalc] Wrong Result when you try to add a %
Summary: [LibreOfficeCalc] Wrong Result when you try to add a %
Status: RESOLVED NOTABUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.4.4.2 release
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2020-06-29 16:38 UTC by yvanbonci
Modified: 2020-06-29 17:04 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description yvanbonci 2020-06-29 16:38:19 UTC
Description:
LibreOfficeCalc give a wrong result if you try to add a % to a number on a cell.
Eg. C2 = 1.81, D2 = C2 + 10%

Expected result = 1.991
Current result = 1.91 

For reaching the expected result i've to use a formula like C2 + (C2 * 35%)

Steps to Reproduce:
1- Set a number on a cell (Eg. 1.81)
2- In another cell add 10% (Eg. 1.81+10%)
3- See the wrong result

Actual Results:
1.81+0.10 = 1.91

Expected Results:
1.81 + 0.181 = 1.991


Reproducible: Always


User Profile Reset: No



Additional Info:
Versione: 6.4.4.2 (x64)
Build ID: 3d775be2011f3886db32dfd395a6a6d1ca2630ff
Thread CPU: 4; SO: Windows 10.0 Build 19041; Resa interfaccia: GL; VCL: win; 
Versione locale: it-IT (it_IT); Lingua interfaccia: it-IT
Calc: threaded
Comment 1 Mike Kaganski 2020-06-29 17:04:13 UTC
This is not a bug.

A value that is written like "10%" is just another way of writing "0.1". It's because "ten percent" is another way of writing "ten hundredths". Thus, when you write

> = C2 + 10%

you effectively write

> = C2 + 0.1

and that rightfully gives (for 1.81 in C2) 1.91.

If you need 10% *of C2* then you must write that explicitly:

> = C2 + C2*10%

or

> = C2 * 110%