https://bugs.documentfoundation.org/show_bug.cgi?id=136615
--- Comment #34 from Eike Rathke <[email protected]> --- (In reply to Albrecht Müller from comment #32) > For the sake of argument lets assume that the internal representation of 1 > Minute is 1.1. Adding another minute to this gives 2.2. What the user sees > if a round down strategy is used is 1 + 1 = 2. Fine. But lets assume that > the internal representation is 0.9. So adding two minutes together gives > 1.8. What the user sees now is 0 + 0 = 1. Not so good. You may assume whatever, but that is just not happening. > I fear that you have invested a lot of time optimizing the use of the > rounding to the nearest strategy built into the floating point arithmetic. > You may have been able to eliminate the problem for some classes of > calculations. But I assume that this work will not solve the underlying > fundamental problem and therefore it will reappear if you use different > examples, e.g. examples that contain multiplies of inexact time values. Yes, summing multiple inaccurate values with SUM() will produce greater inaccuracies, though the Kahan summation algorithm eliminates quite a portion already. Note also that operator+/operator- with two operands now (for upcoming 24.2) does things differently and detects if (date+)time is involved, and if so uses a duration class that eliminates an accuracy error in the nanoseconds range to land on an exact second if indicated, which when converted back to a floating point value delivers a better result. -- You are receiving this mail because: You are the assignee for the bug.
