Bug 37326

Summary: New LINEST fails for some special values
Product: LibreOffice Reporter: Regina Henschel <rb.henschel>
Component: CalcAssignee: Not Assigned <libreoffice-bugs>
Status: CLOSED FIXED    
Severity: normal    
Priority: medium    
Version: 3.3.0 release   
Hardware: Other   
OS: All   
Whiteboard:
Crash report or crash signature: Regression By:
Attachments: Examples for the bug
Correct place, which has produced the erroneous zeros

Description Regina Henschel 2011-05-18 12:09:06 UTC
Created attachment 46871 [details]
Examples for the bug

In case forcing through origin, LINEST fails, if the data have zeros in the row
from left to right till diagonal (including).
In case with constant LINEST fails, if one data row has exactly the mean,
because the input data is transformed to data-mean.

This is caused by line
pVecR[col] = -fSignum * fScale * fEuclid;
in bool lcl_CalculateQRdecomposition in interp5.cxx
The variable fsignum is zero in this special cases and the matrix R becomes
singular.

The same error occurs in the similar situation in LOGEST, TREND, and GROWTH.
Follow the red text in the attached document to reproduce the error.

I have reported the same bug to OOo in http://openoffice.org/bugzilla/show_bug.cgi?id=118029, but perhaps you do not want to wait, till they integrate the patch.
Comment 1 Regina Henschel 2011-05-18 12:12:49 UTC
Created attachment 46872 [details]
Correct place, which has produced the erroneous zeros
Comment 2 Andras Timar 2011-05-20 03:11:56 UTC
Patch was pushed to git (to libreoffice-3-4-0 branch, too). Marking as resolved fixed.
Comment 3 Regina Henschel 2017-04-19 16:35:27 UTC
verified in LO 5.4