Download it now!
Bug 101838 - Editing: Calculation error for MINVERSE function
Summary: Editing: Calculation error for MINVERSE function
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.1.4.2 release
Hardware: x86 (IA32) Linux (All)
: medium normal
Assignee: Not Assigned
URL: http://nabble.documentfoundation.org/...
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-09-01 07:59 UTC by Alex Kempshall
Modified: 2016-09-22 16:06 UTC (History)
5 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Alex Kempshall 2016-09-01 07:59:41 UTC
When compiling LibreOffice I get a failed Unit test. The problem occurs in  sc/qa/unit/functions_test.cxx with

CPPUNIT_ASSERT_DOUBLES_EQUAL(1.0, rDoc.GetValue(1, 2, 0), 1e-14); 

whilst testing sc/qa/unit/data/functions/fods/minverse.fods

The problem appears to be related to row 10 of sheet 2 in minverse.fods where in LO 5.1.4.2 and in 5.3.0.0.alpha0+ both return a value of -4.73398051506661E+016 when an error is expected.

I know nothing about the MINVERSE function.
Comment 1 Eike Rathke 2016-09-02 12:10:33 UTC
So this seems to point out the weird build failures we had with the function test documents that weren't reproducible on other systems. Adding interests to Cc ...
Comment 2 Alex Kempshall 2016-09-02 13:09:01 UTC
During digging around I encountered an oddity with row 27 of file minverse.ods.

On Lubuntu 14.04 (up to date as off a few days ago) and Slackware-Current (14.2) which hadn't been updated for a few months I found that the actual results and expected results matched - so no problem.

For some reason I ported the file back to Slackware 14.1 - I wasn't going to compile LO there so I don't know why I did this other than idle curiosity. Anyway, for Row 27 on Slackware 14.1 the actual result was 169841859430433 whereas what was expected was 169841859430434

As I say this problem has gone away when I tested on Lubuntu 14.04 and  Slackware-Current (14.2).
Comment 3 Luke 2016-09-06 05:41:08 UTC
I'm seeing this on 32-bit Ubuntu 16.04 but not 64-bit. Could this be a 32/64 bit issue?  The last working build I have is d999069ec6ace6e43b054f26a48f99cbec621628 from 7/14. I'll see if I can narrow the window down a bit.
Comment 4 Eike Rathke 2016-09-08 13:01:52 UTC
See also recent tinderbox Linux-rpm_deb-x86_71-TDF and Linux-rpm_deb-x86_71-TDF-dbg builds.
Comment 5 Luke 2016-09-11 08:26:46 UTC
I was pressing F9 not Shift+Ctrl+F9. With a recalculate all, I was able to reproduce it on d99906 and the. 5.1.4.2 official Ubuntu build.

Interestingly the minverse.fods test also fails with Excel 2013 which calculates A10=-4.5E+15, while 32-bit calc comes to A10=-4.7E+16.
Comment 6 Eike Rathke 2016-09-20 13:42:57 UTC
(In reply to Luke from comment #5)
> I was pressing F9 not Shift+Ctrl+F9. With a recalculate all, I was able to
> reproduce it on d99906 and the. 5.1.4.2 official Ubuntu build.

Note that the function tests in question are not part of 5.1, this is specifically about current master 32-bit builds failing.

Anyway, we now disabled the tests for 32-bit until a more detailed solution is available as not only one or two tests are affected.
Comment 7 Alex Kempshall 2016-09-22 16:06:28 UTC
On 16/09/16 11:05, Stephan Bergmann wrote:
>
> Turns out, the relevant GCC switches are
>
>   -mfpmath=sse -msse2
>

On this basis I ran

make clean && make ENVCFLAGS="-mfpmath=sse -msse2" ENVCFLAGSCXX="-mfpmath=sse -msse2" && make sc.check

The compile and tests all completed successfully on an up to date 32-bit Lubuntu 14.04 and 32-bit Slackware-Current from November 2015. I haven't pulled any new code since 1st September so haven't inadvertently picked up the work around about disabling the tests.