| Summary: | EDITING: Changed functionality of min/max of empty array/unexpected value returned | ||
|---|---|---|---|
| Product: | LibreOffice | Reporter: | Teraslilja <m-Matti-a.Lehtonen> |
| Component: | Calc | Assignee: | Kohei Yoshida <kohei> |
| Status: | RESOLVED FIXED | ||
| Severity: | normal | CC: | miguelangelrv |
| Priority: | medium | ||
| Version: | 4.2.3.3 release | ||
| Hardware: | Other | ||
| OS: | Linux (All) | ||
| Whiteboard: | BSA target:4.3.0 target:4.2.5 | ||
| Crash report or crash signature: | Regression By: | ||
| Attachments: | Demonstrates different min/max equations | ||
*** Bug 77968 has been marked as a duplicate of this bug. *** Hi Teraslilja, thanks for reporting. Reproducible with: Win7x64Ultimate Version: 4.2.0.4 Build ID: 05dceb5d363845f2cf968344d7adab8dcfb2ba71 Versión: 4.2.3.3 Id. de compilación: 882f8a0a489bc99a9e60c7905a60226254cb6ff0 Version: 4.3.0.0.alpha1+ Build ID: b08754f3358992387ea0eec7957745f4667ea7eb TinderBox: Win-x86@39, Branch:master, Time: 2014-04-26_00:32:11 Last working. Version: 4.1.6.1 Build ID: a59ce81388f477fc89db57f0c27f222f31884eb The problem seems in relation with the third parameter for IF() function, not present in the formulas, adding it works as expected. If using array equation like {=MIN(IF(B3:B11="b",C3:C11,0))} in example attached, it will return 0 and not 1, as expected/wanted. Adding a third parameter for IF() is not a "fix" in this case.
Because MIN is MIN, it is not a formula error, you need to set up instead 0 a value higher enough to get the correct result. Even the bug is solved the same problem will be there.
{=MIN(IF($B$3:$B$11="b",$C$3:$C$11,""))}
and you need develop more the formula to avoid issues with for values like "d" not in the list, what return the bug values.
I'll take this. Kohei Yoshida committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=a4a5f67008a931508a9d963f6b95db9cb9d45aef fdo#77969: Write test for this corner case. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Kohei Yoshida committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=453ea919e70fa9832f11e3ef042bb80cd86892cc fdo#77969: Return 0 in case of matrix consisting of all empty elements. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. 4.2 backport: https://gerrit.libreoffice.org/9189 Kohei Yoshida committed a patch related to this issue. It has been pushed to "libreoffice-4-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=bfc8a79c957dd65dc7e42c47c4fc6de61443fa29&h=libreoffice-4-2 fdo#77969: Return 0 in case of matrix consisting of all empty elements. It will be available in LibreOffice 4.2.5. The patch should be included in the daily builds available at http://dev-builds.libreoffice.org/daily/ in the next 24-48 hours. More information about daily builds can be found at: http://wiki.documentfoundation.org/Testing_Daily_Builds Affected users are encouraged to test the fix and report feedback. Fixed. |
Created attachment 98035 [details] Demonstrates different min/max equations Normally, expected value of min/max of empty array is zero. With 4.2.3.3, min/max of empty *array*, is +-inf, not zero as expected and previous versions has returned. for comparison: Gnumeric (1.12.9) return zeros. Operating System: Ubuntu Version: 4.2.3.3 release