[Libreoffice-bugs] [Bug 143772] New: Currency doesn't round properly in calculated fields of Calc.

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Aug 7 15:33:03 UTC 2021


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

            Bug ID: 143772
           Summary: Currency doesn't round properly in calculated fields
                    of Calc.
           Product: LibreOffice
           Version: 7.1.3.2 release
          Hardware: x86-64 (AMD64)
                OS: All
            Status: UNCONFIRMED
          Severity: normal
          Priority: medium
         Component: Calc
          Assignee: libreoffice-bugs at lists.freedesktop.org
          Reporter: galdar1486 at gmail.com

Description:
When I do some major calculations involving currency, the stated currency is
correct, however, when adding two cells together based upon a formula, it used
the non-currency amount to add them which results in a penny difference. If I
used the ROUNDUP function, it gives the correct result.

Steps to Reproduce:
1. Calculated value that is $1.46 is added to a calculated value of $4809.69.
2. Actual decimal value of $1.46 is $1.45506815
3. Actual decimal value of $4809.69 is $4809.68880000
4. Resulting addition should be $4,811.14386815.
5. Limiting the decimal places to both values to 2 places as in standard
currency gives the values $1.46 and $4809.69 respectively, which is the correct
rounding.
6. However, in adding the two values, it calculate them to $4811.14 off of the
NON-truncated 2 decimal place currency value, when it should calculate them to
$4811.15.
7. If I use the ROUNDUP function on the calculated value, it displays correct,
but as currency values, the decimal places allowed should be the amounts
summed, not the non-truncated values.

Actual Results:
$1.46 + $4809.69 = $4811.14 when it should be $4811.15.

Expected Results:
$1.46 + $4809.69 = $4811.14 when it should be $4811.15.


Reproducible: Always


User Profile Reset: No



Additional Info:
Version: 7.1.3.2 (x64) / LibreOffice Community
Build ID: 47f78053abe362b9384784d31a6e56f8511eb1c1
CPU threads: 12; OS: Windows 10.0 Build 19042; UI render: Skia/Vulkan; VCL: win
Locale: en-US (en_US); UI: en-US
Calc: threaded

-- 
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/20210807/50c331d1/attachment.htm>


More information about the Libreoffice-bugs mailing list