Created attachment 118888 [details] Personal finance tracking spreadsheet with personal info removed Using a Calc ods spreadsheet to track personal finances, with a long series of rows with a formula like =C59+A60-B60 (new balance = previous balance + any money in minus any money out). See cell C81 in the attachment re. the problem, showing that 1 minus 1 is -2.08721928629529E-014 rather than 0. If the spreadsheet is using floating-point, or (worse) single-precision floating-point to represent numbers, the math needs to be done right so that floating-point deltas (between visible numbers like 0.03 and the closest floating-point representation) do not accumulate.
Of course Calc uses IEEE 754 double precision floating point values. However, that does not resolve the fact that not all decimal numbers are exactly representable in binary floating point formats. That is not a fault of Calc and Calc is not the only spreadsheet program suffering from it. See also https://support.microsoft.com/kb/78113 and https://blogs.office.com/2008/04/10/understanding-floating-point-precision-aka-why-does-excel-give-me-seemingly-wrong-answers/ and https://en.wikipedia.org/wiki/Numeric_precision_in_Microsoft_Excel and http://floating-point-gui.de/ Other algorithms could be implemented, but only at the cost of performance on large data sets, which would be a different RFE. If you need exactly rounded results you have to use the ROUND() spreadsheet function wherever appropriate or activate the Tools->Options->Calc->Calculate "Precision as shown" option, which rounds every result to the precision of the number format that is used to display the value.
*** Bug 100552 has been marked as a duplicate of this bug. ***