Created attachment 50663 [details] Spreadsheet where IRR fails at cell G11 Internal Return Rate (IRR) function is widely used in financial tasks. In the attached spreadsheet example, LibreOffice gives "Err:523" at cell G11. However, the value 0.3775... is a solution. This solution is found by Gnumeric on the same spreadsheet file. By the way, MS Excel fails as LibreOffice does. The green box checks that solution is correct. The check is based on the fact that IRR value must be an interest rate that makes the Net Present Value (NPV) of the number series equal to 0.
[This is an automated message.] This bug was filed before the changes to Bugzilla on 2011-10-16. Thus it started right out as NEW without ever being explicitly confirmed. The bug is changed to state NEEDINFO for this reason. To move this bug from NEEDINFO back to NEW please check if the bug still persists with the 3.5.0 beta1 or beta2 prereleases. Details on how to test the 3.5.0 beta1 can be found at: http://wiki.documentfoundation.org/QA/BugHunting_Session_3.5.0.-1 more detail on this bulk operation: http://nabble.documentfoundation.org/RFC-Operation-Spamzilla-tp3607474p3607474.html
Tested on 3.5.0beta2. Still unable to calculate IRR on this example.
I did some tests, found that we must enter "Guess" value to show the result. > Internal Return Rate (IRR) function is widely used in financial tasks. In > the attached spreadsheet example, LibreOffice gives "Err:523" at cell G11. > However, the value 0.3775... is a solution. This solution is found by > Gnumeric on the same spreadsheet file. By the way, MS Excel fails as > LibreOffice does. I guessed what you meant is cell G10 (not G11) = IRR(G11:G251;0), then correct result will be shown. Tested on LO 4.0.4.2 (Win7 32bit) Please REOPENED this bug if you can't reproduce this on latest stable release (3.6.6 or 4.0.4)
Right, I meant G10. It works correctly if introduced 0 as guess value in Version 4.0.2.2 (Build ID: 400m0(Build:2)). However, if a result can be obtained without requiring the user to guess that the result is near 0 (as gnumeric does), it would be nicer. If I can I will have a look to the code, but I am quite busy now.
Needs confirmed by QA - moving to UNCONFIRMED. Thanks
I can confirm with Version: 4.4.0.0.alpha1+ Build ID: 04ea7b24ec1b5a027efa0b850f2bc3ac7116c52e TinderBox: Linux-rpm_deb-x86_64@46-TDF, Branch:master, Time: 2014-11-06_00:02:40 Setting as NEW, excel 2010 show value 0,3775673823%
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.0.4 or later) https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for your help! -- The LibreOffice QA Team This NEW Message was generated on: 2015-12-20
** Please read this message in its entirety before responding ** To make sure we're focusing on the bugs that affect our users today, LibreOffice QA is asking bug reporters and confirmers to retest open, confirmed bugs which have not been touched for over a year. There have been thousands of bug fixes and commits since anyone checked on this bug report. During that time, it's possible that the bug has been fixed, or the details of the problem have changed. We'd really appreciate your help in getting confirmation that the bug is still present. If you have time, please do the following: Test to see if the bug is still present on a currently supported version of LibreOffice (5.2.5 or 5.3.0 https://www.libreoffice.org/download/ If the bug is present, please leave a comment that includes the version of LibreOffice and your operating system, and any changes you see in the bug behavior If the bug is NOT present, please set the bug's Status field to RESOLVED-WORKSFORME and leave a short comment that includes your version of LibreOffice and Operating System Please DO NOT Update the version field Reply via email (please reply directly on the bug tracker) Set the bug's Status field to RESOLVED - FIXED (this status has a particular meaning that is not appropriate in this case) If you want to do more to help you can test to see if your issue is a REGRESSION. To do so: 1. Download and install oldest version of LibreOffice (usually 3.3 unless your bug pertains to a feature added after 3.3) http://downloadarchive.documentfoundation.org/libreoffice/old/ 2. Test your bug 3. Leave a comment with your results. 4a. If the bug was present with 3.3 - set version to "inherited from OOo"; 4b. If the bug was not present in 3.3 - add "regression" to keyword Feel free to come ask questions or to say hello in our QA chat: http://webchat.freenode.net/?channels=libreoffice-qa Thank you for helping us make LibreOffice even better for everyone! Warm Regards, QA Team MassPing-UntouchedBug-20170306
I still can REPRO the bug with: Version: 5.3.0.3 (x64) Build-ID: 7074905676c47b82bbcfbea1aeefc84afe1c50e1 CPU-Threads: 4; BS-Version: Windows 6.19; UI-Render: Standard; Layout-Engine: neu; Gebietsschema: de-DE (de_DE); Calc: group @Winfried: something for you?
With the attached document IRR returns an error. However, when you change the call to IRR to include an estimate and you give an estimate of 0.02 or less (including negative values), you get a result (0,3775673823% , probably the same as Excel/Gnumeric). When you look at the OpenFormula Standard, you will find that depending on the implementation of the IRR function a error as result is acceptable. That needs some explanation: IRR uses iterative algorithms to get a result, i.e. it starts with an estimate (either given in the call to IRR, or a default first estimate as written in the source code) and calculates backwards with that estimate to see how far wrong the estimate is. Depending on the error found, the algorithm adjusts its estimate and recalculates the error. This process repeats itself until the error is so small that is is acceptable. But -and this is what happens here- it is possible that for some combinations of data and estimate the error does not decrease and that the recalculations continue indefinitely -or until the algorithm has a maximum number of calculations within which an acceptable result must be found. If that maximum is exceeded, an error is returned. The fact that Gnumeric and Excel do return a value and not an error with the attached document means that they either use a different algorithm (there are many possible algorithms for this type of calculation) and/or use a different starting estimate. It is impossible to guarantee that a valid result will be found with IRR, but possibly it could try again with another starting estimate if the first estimate does not lead to a result. Even then there will be cases where an error is returned by IRR. I will do some tests and either take this bug to myself to improve its behaviour, or set the status to 'RESOLVED/WONTFIX', as that is the actual situation.
Tests produces only a marginal improvement and adds extra complexity, so that is not a solution. I have changed the title of the bug report as what really is missing, is help text explaining that: - it is possible for IRR to fail and return Error 523, with "Calculation does not converge" in the status bar; - this can be avoided by passing an(other) estimate to IRR.
Olivier Hallot committed a patch related to this issue. It has been pushed to "libreoffice-6-0": http://cgit.freedesktop.org/libreoffice/help/commit/?id=2d1dfbc702217bde0e208de8f969cdb1b4262f81&h=libreoffice-6-0 tdf#40460 Improve help for Calc IRR function
Olivier Hallot committed a patch related to this issue. It has been pushed to "master": http://cgit.freedesktop.org/libreoffice/help/commit/?id=8b0a4944747cde7395b36e53893d85dc8b07ee05 tdf#40460 Improve help for Calc IRR function