tests sc_array_functions_test fail due to floating point precision

Stephan Bergmann sbergman at redhat.com
Thu Dec 7 09:13:16 UTC 2017


On 12/02/2017 08:47 AM, Milton Vandersloot wrote:
> functions_test.cxx:43:Assertion
> Test name: ArrayFunctionsTest::testArrayFormulasFODS
> double equality assertion failed
> - Expected: 1
> - Actual  : 0
> - Delta   : 1e-14
> 
> 
> The issue seems to be (again) floating point precision. Indeed, I've compiled LibreOffice with FMA (fused multiply-add) instructions, if I disable them, i.e. passing -ffp-contract=off to GCC, then the tests succeed. Note that FMA has slightly different floating point precision than ordinary plus and mult [0, 1].

What is ultimately missing, I think, is a spec what the acceptable 
results of calculations in Calc are, and tests written so that they 
check whether or not the calculated results are in the acceptable ranges.


More information about the LibreOffice mailing list