https://bugs.documentfoundation.org/show_bug.cgi?id=168277

            Bug ID: 168277
           Summary: Wrong Round result if rounding a specific formula
                    (100-MROUND)
           Product: LibreOffice
           Version: unspecified
          Hardware: x86-64 (AMD64)
                OS: Windows (All)
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: [email protected]
          Reporter: [email protected]

Description:
When I use a specific formula containing (100-ROUND(MROUND())) with specific
values, I get a wrong result.
I cannot reproduce the bug with other initial data, so the exact numbers used
to reproduce the bug should be used (see also attached file). 

Steps to Reproduce:
1. SET: A1 = 79, C1 = 124, B1=MROUND((C1+A1/4+A1)/2;2)
2. SET: B2=ROUND(B1*100/C1;2) 
3. SET: B3=100-ROUND(B1*100/C1;2) / C3 =100-B2 
4. TO SEE THE WRONG RESULTS, B2:C3 should be set to MAXIMUM SHOWED DECIMAL
PLACES (icon .00+).

The reproduced steps can also be seen in the attached file.

Actual Results:
B2 = CORRECT OUTPUT (90,32)
B3, C3 = WRONG OUTPUT (9,6800000000000100 instead of 9,68)

Expected Results:
B3,C3 = CORRECT OUTPUT (90,32)


Reproducible: Always


User Profile Reset: No

Additional Info:
This only happens when using '100-' in the formula of B3/C3. It does not happen
if you use a different number (e.g. 10-, 1000-,...).
I also cannot reproduce the incorrect result by entering different numbers in
cells A1 and C1 (I tried a few); it is probably due to a specific result of the
division in B2.

Version: 25.2.3.2 (X86_64) / LibreOffice Community
Build ID: bbb074479178df812d175f709636b368952c2ce3
CPU threads: 16; OS: Windows 10 X86_64 (10.0 build 19045); UI render: Skia/

-- 
You are receiving this mail because:
You are the assignee for the bug.

Reply via email to