Bug 100496 - function AMORDEGRC and AMORLINC - basis 2 result Err:502
Summary: function AMORDEGRC and AMORLINC - basis 2 result Err:502
Status: RESOLVED FIXED
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Winfried Donkers
URL:
Whiteboard: target:5.3.0
Keywords:
: 100499 (view as bug list)
Depends on:
Blocks: 102365
  Show dependency treegraph
 
Reported: 2016-06-20 08:28 UTC by raal
Modified: 2016-10-18 14:42 UTC (History)
3 users (show)

See Also:
Crash report or crash signature:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description raal 2016-06-20 08:28:05 UTC
https://help.libreoffice.org/Calc/Financial_Functions_Part_One#AMORDEGRC

=AMORDEGRC(10000;DATE(2012;3;1);DATE(2012;12;31);1500;1;0,3;2)  result is Err502

According to help basis 2 should work.

note: in excel basis 2 not exist: https://support.office.com/en-us/article/AMORDEGRC-function-a14d0ca1-64a4-42eb-9b3d-b0dededf9e51
Comment 1 Buovjaga 2016-06-26 10:25:50 UTC
Confirmed.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: ff25ea3d5ccf3a990767cbb1ef99037d3f84b072
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on June 26th 2016
Comment 2 Winfried Donkers 2016-07-07 06:42:02 UTC
*** Bug 100499 has been marked as a duplicate of this bug. ***
Comment 3 Winfried Donkers 2016-07-07 07:38:22 UTC
AMORLINC and AMORDEGR are Add-in functions from the Excel Analysis pack and as such primarily complies with Excel.
Therefore these functions return an error with basis 2. There is no technical/numerical need in the functions to reject basis 2; the functions work fine with this constraint removed.

There are several 'solutions':
1-leave all as is, i.e. accept that the functions do not fully comply with ODFF1.2 - but do change the help text;
2- make the functions compliant with ODFF1.2 and accept breaking the inter-operability with Excel - and add a note to the help text;
3- rename the functions to AMORLINC_ADD and AMORDEGR_ADD and add new ODFF1.2-compliant functions AMORLINC and AMORDEGR.

1 and 2 are not full solutions, so I tend to opt for 3.

@Eike: Given your expertise of both Calc and ODFF, what do you advise?
Comment 4 Eike Rathke 2016-07-12 16:31:25 UTC
I'd rather accept argument value 2 as basis and mention in the help text that Excel doesn't support it. Gnumeric fwiw also accepts it.
Comment 5 Winfried Donkers 2016-09-22 15:02:58 UTC
I'll make Calc accept basis 2.

Changing the help text as suggested in comment 4 is beyond my capabilities.
@Raal: perhaps you could create a separate bug report to address the change of the help text?
Comment 6 Commit Notification 2016-10-05 21:21:43 UTC
Winfried Donkers committed a patch related to this issue.
It has been pushed to "master":

http://cgit.freedesktop.org/libreoffice/core/commit/?id=75d5acfc7820235fab724a63c0bf4e61a0242bec

tdf#100496 accept year basis 2 for AMORDEGRC and AMORLINC.

It will be available in 5.3.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.