Bug 37326 - New LINEST fails for some special values
Summary: New LINEST fails for some special values
Status: CLOSED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
3.3.0 release
Hardware: Other All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2011-05-18 12:09 UTC by Regina Henschel
Modified: 2017-04-19 16:35 UTC (History)
0 users

See Also:
Crash report or crash signature:


Attachments
Examples for the bug (16.09 KB, application/vnd.oasis.opendocument.spreadsheet)
2011-05-18 12:09 UTC, Regina Henschel
Details
Correct place, which has produced the erroneous zeros (517 bytes, patch)
2011-05-18 12:12 UTC, Regina Henschel
Details

Note You need to log in before you can comment on or make changes to this bug.
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