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

Eike Rathke <er...@redhat.com> changed:

           What    |Removed                     |Added
----------------------------------------------------------------------------
           Assignee|libreoffice-b...@lists.free |er...@redhat.com
                   |desktop.org                 |
             Status|NEW                         |ASSIGNED
            Summary|Calc Round Down is Rounding |Calc Round Down is Rounding
                   |Up                          |Up for some values.

--- Comment #9 from Eike Rathke <er...@redhat.com> ---
There is no decimal representation in binary floating point hence any decimal
"nth digit" does not exist for values other than multiples of powers of two.
Period.

(In reply to NOYB from comment #8)
> If the user want's it rounded down to 2 digits then 0.93
> is the correct answer/result for a value of 0.9399999999999995.
It is not if that 0.9399999999999995 is a result of the calculation of 8.94-8
because the exact number 0.94 is not representable in binary floating point and
the nearest value is 0.939999999999999946709294817992486059665679931640625 and
the user expects a ROUNDDOWN(8.94-8;2) to be ROUNDDOWN(0.94;2) to equal 0.94
(which it never is).


I don't say we can't have a better implementation, I just state the
complexities.

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

Reply via email to