Apache OpenOffice (AOO) Bugzilla – Issue 106118
LINEST uses incorrect default parameter
Last modified: 2013-01-29 21:40:33 UTC
The OOo implementation of LINEST works correctly if the optional third and fourth parameters are omitted, however the third parameter incorrectly defaults to FALSE if the fourth parameter is specified but not the third. That is, LINEST(range;range;;1) incorrectly returns the results for LINEST(range;range;0;1) rather than the expected LINEST(range;range;1;1) (per LINEST helpfile) This is demonstrated in the document linked through the URL above. (I prepared it thinking I could send an attachment, but don't see a way to do so here.)
Created attachment 65488 [details] Example of the LINEST default parameter issue
If I read ODFF 6.17.40 correct, it should not be possible to omit the third parameter and use the forth parameter. So acting strongly to ODFF, OOo should generate an "error in parameter list". Excel allows to omit the third parameter and uses the default TRUE. When importing such spreadsheet, OOo should set the third parameter to TRUE. It has to be discussed whether OOo should allow to omit the third parameter, when the forth parameter is used. When OOo allows it, the default has to be TRUE. The help says that the default is TRUE, but it also says that it is not possible to omit the third parameter when the forth parameter is used. So currently the OOo does not act as described in the help.
Thanks Regina - you hit the nail on the head! This issue became apparent to me in importing an Excel spreadsheet into OOo, and finding (after much confusion) that it gave a different LINEST result than that obtained in Excel. I believe any fix preventing such from occurring would be an important improvement.