Leonard Mada wrote:
I noticed that Calc calculates the SUM in the same order as that of the data cells. However I was reading somewhere (though do not remember anymore where) that it is best to calculate the sum by: 1. ordering the numbers from smallest to largest (as absolute numbers, i.e. without sign) 2. adding them up starting with the smallest (smallest absolute number, i.e. 2 and not -90000 in this two number example)

If someone tried such a change, and measured the accuracy versus the performance hit, we could decide if we want to change it.

NOTE
====
A testcase where the final result is 0 is tricky, because I believe Calc rounds many things to 0, i.e. results that should give 0 give actually 0 (not necessarily because of brilliant calculations but because of rounding), and results close to 0 are rounded, too, and give 0 (though they shouldn't).

Yes, results "very close" to zero are made zero, so comparisons work (try to explain to a user that 0.1+0.2-0.3 isn't equal to 0). See sal/inc/rtl/math.hxx for the details.

Niklas

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to