Created attachment 170056 [details] Sample for XIRR/XNPV file:///usr/share/libreoffice/help/en-US/text/scalc/01/04060118.html?DbPAR=CALC The help page for Financial Functions Part Three says: =XIRR(B1:B5; A1:A5; 0.1) returns 0.1828. and =XNPV(0.06;B1:B5;A1:A5) returns 323.02. (the sample data is under XIRR) The actual results in Calc are 0.1948 and 332.57 respectively. See the attached sample.
(In reply to Aron Budea from comment #0) > file:///usr/share/libreoffice/help/en-US/text/scalc/01/04060118. > html?DbPAR=CALC Oops, meant to link this: https://help.libreoffice.org/7.1/en-US/text/scalc/01/04060118.html In addition, the order is messed up, compare the above with version 7.0's help: https://help.libreoffice.org/7.0/en-US/text/scalc/01/04060118.html Ie. in 7.1 help the order is random: INTRATE, XNPV, RRI, XIRR, IPMT. And in 7.0 the order is alphabetical: RATE, RRI, VDB, XIRR, XNPV.
(In reply to Aron Budea from comment #0) > The actual results in Calc are 0.1948 and 332.57 respectively. And the results are correct, they're the same in Excel.
Created attachment 170061 [details] LibreOffice 7.1 and excel side by side. I see the same result in LibreOffice 7.1 and excel
Then you can confirm the help entry is wrong, right?
The main issue (wrong results of XIRR() and XNPV()) in this bug seems to have already been fixed by Steve Fanning a few weeks ago: https://git.libreoffice.org/help/+/1babc5665e751c926cd049e4784b08b0e2f26f7d%5E%21/ And the online help built from master reflects the fix: https://help.libreoffice.org/7.2/en-US/text/scalc/01/04060118.html The problem was in the sample data, cell A2 should be Feb. 1st instead of Jan. 2nd. Mainly a date format mistake, likely caused by the original help author using a non-standard YYYY-DD-MM format. The order of entries wasn't touched in the above commit and I didn't investigate further.
Good catch, thanks, nice to see it fixed! Retitling this on the wrong order, then (as described in comment 1).
(In reply to Aron Budea from comment #6) > Retitling this on the wrong order, The ordering problem arises because the sort function (in the help page) cannot handle <h1>,<h2>. You will now see the same kind of problem in other pages that use sort (and have some elements using <h2>)(e.g., Glossary). In short, the problem is not with the Financial page itself, but with the <sort> function that is used in that page. cc: Ilmari
The order seems correct in https://help.libreoffice.org/7.3/en-US/text/scalc/01/04060118.html. Can we close this one now?
(In reply to Julien Nabet from comment #8) > The order seems correct in > https://help.libreoffice.org/7.3/en-US/text/scalc/01/04060118.html. > > Can we close this one now? Yes, seems like this fixed it: commit 26e5265ade24d7eeeaf7d120e0dbcb4cbc598fed Author: Olivier Hallot <olivier.hallot@libreoffice.org> Date: Wed Apr 14 19:31:31 2021 -0300 Fix sort order of Calc functions