[Libreoffice-bugs] [Bug 107519] New: Erroneous calculation in IF statements ( order of operations)

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Apr 29 15:31:18 UTC 2017


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

            Bug ID: 107519
           Summary: Erroneous calculation in IF statements (order of
                    operations)
           Product: LibreOffice
           Version: 5.3.2.2 release
          Hardware: All
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: chbug at chaven.com

Description:

A cell that  has:
=SUM(F6+$E$3)*(1+$E$2)

produces the correct valuation

When using the same calculation in an IF statement, it does not produce the
same results:

=IF(F6<$B$20,sum((F6+$E$3)*(1+$E$2)),F6*(1+$E$2))

(when the sum calculation is performed it apparently does not follow the
correct order of operations.    so both formulas implementations achieve
different results.



Steps to Reproduce:
1.F6 = 1000000 ; $E$3 = 18000 ; $E$2 = .08
2.=SUM(F6+$E$3)*(1+$E$2)     produces 1099440
3.=IF(F6<$B$20,sum((F6+$E$3)*(1+$E$2)),F6*(1+$E$2))     produces: 1080000

Same results regardless of initial values so it's the operation that is faulty.

Actual Results:  
1.F6 = 1000000 ; $E$3 = 18000 ; $E$2 = .08
2.=SUM(F6+$E$3)*(1+$E$2)     produces 1099440
3.=IF(F6<$B$20,sum((F6+$E$3)*(1+$E$2)),F6*(1+$E$2))     produces: 1080000

Same results regardless of initial values so it's the operation that is faulty.

Expected Results:
Should follow the same order of operations.


Reproducible: Always

User Profile Reset: no; happens on different systems.

Additional Info:


User-Agent: Mozilla/5.0 (Windows NT 6.3; WOW64) AppleWebKit/537.36 (KHTML, like
Gecko) Chrome/57.0.2987.98 Safari/537.36 OPR/44.0.2510.857

-- 
You are receiving this mail because:
You are the assignee for the bug.
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <https://lists.freedesktop.org/archives/libreoffice-bugs/attachments/20170429/78a52754/attachment.html>


More information about the Libreoffice-bugs mailing list