Bug 100650 - IPMT, parameter Type
Summary: IPMT, parameter Type
Status: RESOLVED NOTOURBUG
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
Inherited From OOo
Hardware: All All
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-28 07:18 UTC by raal
Modified: 2016-07-04 12:50 UTC (History)
2 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-28 07:18:07 UTC
ODF: IPMT
Summary: Returns the amount of an annuity payment going towards interest.
Syntax: IPMT( Number Rate ; Number Period ; Number Nper ; Number PV [ ; Number FV = 0 [ ; Number Type = 0 ] ] )
... Type: the due date for the payments (optional). Zero if omitted. If type is 1, then payments are made at the beginning of each period. If type is 0, then payments are made at the end of each period.

=IPMT(0,06/52; 30; 4*52; 8000; 0 ;2)
=IPMT(0,06/52; 30; 4*52; 8000; 0 ;-2)  , should return #error, parameter type is 0 or 1
Comment 1 Buovjaga 2016-07-02 19:32:55 UTC
(In reply to raal from comment #0)
> =IPMT(0,06/52; 30; 4*52; 8000; 0 ;-2)  , should return #error, parameter
> type is 0 or 1

Yes, it does not give an error.

Arch Linux 64-bit, KDE Plasma 5
Version: 5.3.0.0.alpha0+
Build ID: ef47ce2397d4ed453fe01d994d13a13f442ec3bb
CPU Threads: 8; OS Version: Linux 4.6; UI Render: default; 
Locale: fi-FI (fi_FI.UTF-8)
Built on July 2nd 2016
Comment 2 Eike Rathke 2016-07-04 12:39:58 UTC
Note that Excel also doesn't return an error, it seems to treat any other value than 0 as 1, and in the Fx help says type is a logical value, while in https://support.office.com/en-US/article/IPMT-function-5CCE0AD6-8402-4A41-8D29-61A0B054CB6F that is not mentioned.

Likely the ODFF definition should be Logical Type = FALSE() instead.