Bug 124279 - Function wizard structure tab shows inconsistent intermediate results
Summary: Function wizard structure tab shows inconsistent intermediate results
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
5.3.7.2 release
Hardware: All All
: medium normal
Assignee: Katarina Behrens (Inactive)
URL:
Whiteboard: target:6.4.0 target:6.3.0.1 target:6.2.5
Keywords:
Depends on:
Blocks: Function-Wizard Calculate
  Show dependency treegraph
 
Reported: 2019-03-22 19:44 UTC by Olivier Hallot
Modified: 2019-06-01 18:25 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
image with formula and function wizard, structure tab (133.73 KB, image/png)
2019-03-22 19:44 UTC, Olivier Hallot
Details

Note You need to log in before you can comment on or make changes to this bug.
Description Olivier Hallot 2019-03-22 19:44:32 UTC
Created attachment 150204 [details]
image with formula and function wizard, structure tab

The attached image shows the issue. The tree view displays/suggest wrong figures.

Step to reproduce

1) Open Calc and place cursor in cell A1
2) enter formula =A2*SIN(EXP(A3)*PI()/6)^A4
3) fill a2, a3, a4 with values 10, 0.312 and 2 respectively.
3) look at the Structure tab of the Function wizard in the picture.

What's wrong?

The intermediate calculation are out of order and does not represent the true intermediate computation.

The image shows in row 3 and 4 all the intermediate results of the calculation.

for example, the line EXP=3.14159... suggest the resulting exponential is 3.141159 (aka PI()), which is wrong.

The final result is correct but the structure of the formula does not shows reliable information. It should be displaying the contents of row 4 in the tree.

I suppose the tree view of the formula was designed to assist in debugging complex formulas, which is not what is happening.
Comment 1 Eike Rathke 2019-03-25 14:06:52 UTC
Easier reproducer: =ABS(-1)*PI() or even just =PI()
Apparently the structure is confused by PI() not having an argument.
Same can be observed with =ABS(-1)*TRUE()
Already in 5.3.7 (oldest I have), don't know if older.
Comment 2 Commit Notification 2019-05-31 22:59:01 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "master":

https://git.libreoffice.org/core/+/ad2acdfa36db00678f44f5cd69d687183f02a0bd%5E%21

tdf#124279: consider also functions with no arguments

It will be available in 6.3.0.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 3 Commit Notification 2019-05-31 23:01:35 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "libreoffice-6-3":

https://git.libreoffice.org/core/+/bf34e08f8d0d90939fea24d17f94434b0cd66439%5E%21

tdf#124279: consider also functions with no arguments

It will be available in 6.3.0.1.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.
Comment 4 Commit Notification 2019-06-01 18:25:41 UTC
Katarina Behrens committed a patch related to this issue.
It has been pushed to "libreoffice-6-2":

https://git.libreoffice.org/core/+/e5a4746378202f8b599de11632b7c8772b735ea2%5E%21

tdf#124279: consider also functions with no arguments

It will be available in 6.2.5.

The patch should be included in the daily builds available at
https://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More
information about daily builds can be found at:
https://wiki.documentfoundation.org/Testing_Daily_Builds

Affected users are encouraged to test the fix and report feedback.