[Libreoffice-bugs] [Bug 87386] Calculation inaccuracy converting calculated numbers to dates and integers.
bugzilla-daemon at bugs.documentfoundation.org
bugzilla-daemon at bugs.documentfoundation.org
Sat Apr 10 16:28:05 UTC 2021
https://bugs.documentfoundation.org/show_bug.cgi?id=87386
b. <newbie-02 at gmx.de> changed:
What |Removed |Added
----------------------------------------------------------------------------
CC| |newbie-02 at gmx.de
--- Comment #15 from b. <newbie-02 at gmx.de> ---
in fp-math '=24,09 - 24' and thus '=mod(24,09;1)' unfortunately results in
8.999999999999986E-2, it's the effect of 'cancellation', and not avoidable by
successively subtracting '1', the step '=2,09 - 1' will fail too,
and calc doesn't apply rounding on date, year, month, day, hour or minute
values but 'truncation', rounding is only performed on seconds, there violating
it's own 'wall clock concept',
self-help for troubled users: round to meaningful amount of decimals digits,
e.g. '=Mod("value with two decimal places"; integer)' can have at most two
decimal places in the result, 'healing rounding', if you get the 'cut'
somewhere between the needed value and the fp-artifacts you are done,
or try 'literal calculations' with the digits given in the string,
'=RIGHT(C13;2)' or '=VALUE(RIGHT(C13;2))' would make it for this case,
idea for programmers: it is an old problem, concerning many areas /
calculations, and causes many irritations up to quarrels, whoever comes first
with a universal solution 'around the corner' will reap fame and glory, i don't
think the task is proven as 'unsolvable' ...
would like to reopen, but would also like to 'not enrage' @Matthew Francis,
choosing the latter ... ;-)
@klsu at cox.net: 'Some people need to learn that computers and software are
supposed to work for people.' - thumbs up
besides: repro in 7.2.0.0.alpha0+
--
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/20210410/416a8629/attachment-0001.htm>
More information about the Libreoffice-bugs
mailing list