Description: see attached testcases for PERCENTRANK, PERCENTRANK.EXC, PERCENTRANK.INC functions. We need to check the constraints and results. Actual Results: . Expected Results: . Reproducible: Always User Profile Reset: No Additional Info: User-Agent: Mozilla/5.0 (Windows NT 6.1; rv:50.0) Gecko/20100101 Firefox/50.0
Created attachment 130010 [details] percentrank
Created attachment 130011 [details] percentrank.inc
Created attachment 130012 [details] percentrank.exc
Summarising the deficiencies: -The constraint that argument significance must be 1 or greater is not applied. This is a simple fix. BTW, Excel doesn't apply this constraint either. The constraint is on ODFF1.2 as well as in the Excel function specifications. -Excel doesn't round values, whereas Calc does. That's why Calc gives 0.667 as result and Excel 0.666 with significance 3 and value 0.666666666... . Mathematically, rounding is the correct way. This is not a Calc bug, but an Excel bug. -Calc does not calculate the resultant significant digits correctly when the value is between approx. 0.1 and 0.37. It produces at least 1 significant digit too much. This is a bug in the Calc code, I still looking for the exact cause in order to fix it. @Raal: Given that All 3 functions use the same code and that PERCENTRANK (ODFF1.2) and PERCENTRANK.INC (Excel) are identical, wouldn't 1 test document for all be more efficient?
Created attachment 130052 [details] combined document used for testing the fixes.
Winfried Donkers committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/core/commit/?id=facb4e69e4c75839df89969206403d2e97146dbd tdf#104981 Fix deficiencies with PERCENTRANK functions. It will be available in 5.4.0. 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.
Winfried Donkers committed a patch related to this issue. It has been pushed to "libreoffice-5-3": http://cgit.freedesktop.org/libreoffice/core/commit/?id=1aa34bf14e86f3b684c56a9db8ebf1307413df5d&h=libreoffice-5-3 tdf#104981 Fix deficiencies with PERCENTRANK functions. It will be available in 5.3.0.2. 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.
Winfried Donkers committed a patch related to this issue. It has been pushed to "libreoffice-5-2": http://cgit.freedesktop.org/libreoffice/core/commit/?id=f0241948bd5c68c50c380d9c38704da563a80ac4&h=libreoffice-5-2 tdf#104981 Fix deficiencies with PERCENTRANK functions. It will be available in 5.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.