[Libreoffice-bugs] [Bug 134763] Writer round behavior differs from Word in a table formula

bugzilla-daemon at bugs.documentfoundation.org bugzilla-daemon at bugs.documentfoundation.org
Sat Nov 14 09:21:59 UTC 2020


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

Mike Kaganski <mikekaganski at hotmail.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
         Resolution|---                         |NOTABUG
             Status|NEW                         |RESOLVED

--- Comment #6 from Mike Kaganski <mikekaganski at hotmail.com> ---
This is not a bug. As mentioned in comment 3, the visible result in not related
to rounding, but to formatting - which are different concepts.

Cell D4 in the table has a "Insert Formula" field with the formula "(4.545
ROUND 5)". Its result is indeed 4.545. Then the field also has *format* - which
is "Standard". That format shows up to two decimal digits for a number. So the
*displayed result* is rightfully 4.55.

But the number contained in the cell is still the correct one - 4.545. You can
check that using a new row in the table, and putting this formula (not a
field!) to D6: "=<D4>+1". Then if you use Table->Number Format to increase
decimal places, you would see that the result is 5.545, which proves that D4
has the correct numeric value.

Then you could change the field's formula in D4 to "(4.545 ROUND 2)", and see
that D6 now shows 5.55 (although D4 is visually unchanged). That is because the
ROUND changes the value, while formatting only changes display - that a very
important thing about formatting.

And then you may change the format used in the D4's field, clicking on
"Additional formats..." element in the "Format" list of the field editor
dialog. Put there any number into the decimal places box.

Closing NOTABUG.

-- 
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/20201114/c28f84e1/attachment-0001.htm>


More information about the Libreoffice-bugs mailing list