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)

REASON
=======
When adding small numbers to large numbers, the rounding error is significantly larger. When adding only small numbers, more decimals get actually added and may influence more relevant digits, too.

DISADVANTAGES
==============
Array has to be sort first (using the absolute values). More time required for the computation.

I wrote a simple Test-Sheet to demonstrate this:
- all columns (1, 2 and 3) have the same data, BUT in a different order
- they should add up to something <0,
- yet the results in column 1 and 2 are rounded to 0!!!

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).

Attachment: Calc-Test-Sheet-SUM.ods
Description: application/vnd.oasis.opendocument.spreadsheet

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

Reply via email to