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

Mike Kaganski <mikekagan...@hotmail.com> changed:

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

--- Comment #5 from Mike Kaganski <mikekagan...@hotmail.com> ---
This is not a bug, but inevitable limitation of hardware calculations. Time in
LibreOffice is internally represented as a fraction of a day; 1 hour is 1/12 =
0.041666666666666... (not representable precisely in machine floating-point
format). When you create series like you did, you always introduce
inaccuracies:

1. When filling the two initial values and dragging, you want Calc to count the
difference between the two initial values, and use it as increment. You have
two dates with times, having values 43105 and 43105,0416666667. Their
difference is 0,041666666656965, not 0.041666666666666, because only ~16
decimal digits fit into the machine number. Adding this value incrementally
naturally starts to deviate very quickly.

2. When you use =A1+TIMEVALUE("01:00") formula, the additional inaccuracies
result because of accumulating error from repeated summation.

The most precise (but not perfect!) calculation could be using the formula
=A$1+TIMEVALUE("01:00")*(ROW()-1), where all intermediate calculations do not
affect result in following cells. The same result you would get, if you use
Sheet->Fill Cells->Fill Series (and put 2018-01-05 00:00:00 to "Start value",
and 01:00:00 to "Increment"). The only drawback of using Fill Series in this
case is that it will need applying Datetime format manually after the
operation.

See also FAQ: https://wiki.documentfoundation.org/Faq/Calc/Accuracy

-- 
You are receiving this mail because:
You are the assignee for the bug.
_______________________________________________
Libreoffice-bugs mailing list
Libreoffice-bugs@lists.freedesktop.org
https://lists.freedesktop.org/mailman/listinfo/libreoffice-bugs

Reply via email to