After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 162923 - TREND function in scalar context
TREND function in scalar context
Status: RESOLVED FIXED
Product: Gnumeric
Classification: Applications
Component: Analytics
git master
Other All
: Normal normal
: ---
Assigned To: Jody Goldberg
Jody Goldberg
Depends on:
Blocks:
 
 
Reported: 2005-01-04 15:53 UTC by Dominic Lachowicz
Modified: 2005-01-10 00:10 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Dominic Lachowicz 2005-01-04 15:53:21 UTC
On win32, but may be cross-platform. Given the example from the gnumeric manual:

Let us assume that the cells A1, A2, ..., A5 contain numbers 11.4, 17.3, 21.3,
25.9, and 40.1, and the cells B1, B2, ... B5 23.2, 25.8, 29.9, 33.5, and 42.7.
Its output is "#VALUE!". The manual says that its output should be:

TREND(A1:A5,B1:B5) equals 156.52.

However, running this same test in Excel XP, the function's value is 12.06522
Comment 1 Ivan Wong 2005-01-04 16:15:26 UTC
I can replicate on Debian sid
Comment 2 Andreas J. Guelzow 2005-01-04 18:13:16 UTC
Interesting:

This call of TREND would return an array of 5 values. If you enter the function
as an array function you get the values:
12.1115533, 15.79824913, 21.61188487, 26.71654064, 39.76177205

If you enter it as a non-array function I would have expected that we get the
first of those numbers rather than #VALUE!. That looks like a bug to me.

The example in the manual is clearly wrong. 

Comment 4 Jody Goldberg 2005-01-10 00:10:54 UTC
1) I've fixed the example in the docs, and the translations
2) There was a minor thinko in the function evaluator that was fixed.  I'd
forgotten that value_intersect handled the array[0] in a non-scalar case.