Bug 100689 - PMT function, PayType, Nper parameter
Summary: PMT function, PayType, Nper parameter
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-30 09:04 UTC by raal
Modified: 2016-07-04 17:18 UTC (History)
1 user (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-30 09:04:28 UTC
ODF definition:
PMT
Summary: Compute the payment made each period for an investment.
Syntax: PMT( Number Rate ; Integer Nper ; Number Pv [ ; [ Number Fv = 0 ] [ ; Number PayType = 0 ] ] )
Returns: Currency
Constraints: Nper > 0
Semantics: Computes the payment made each period for an investment. The parameters are:
Rate: the interest rate per period.
Nper: the total number of payment periods.
Pv: the present value of the investment.
Fv: the future value of the investment; default is 0.
PayType: the type of payment, defaults to 0. It is 0 if payments are due at the end of the period; 1 if they are due at the beginning of the period. With PayType=1 the first payment is made on the same day the loan is taken out.

=PMT(0,0199/12;36;25000;0;2)  should be error: PayType is 0 or 1
=PMT(0,0199/12;-36;25000;0;0)  should be error:  Constraints: Nper > 0
Comment 1 Buovjaga 2016-07-02 19:45:38 UTC
(In reply to raal from comment #0)
> =PMT(0,0199/12;36;25000;0;2)  should be error: PayType is 0 or 1
> =PMT(0,0199/12;-36;25000;0;0)  should be error:  Constraints: Nper > 0

Yeah, no error for me.

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 17:18:29 UTC
Both Excel and Gnumeric calculate the same results.
PayType should be Logical PayType = FALSE() instead.
Apparently the constraint Nper != 0 is used, if and how much sense it makes to have Nper<0 is beyond my financial background..

https://lists.oasis-open.org/archives/office-comment/201607/msg00002.html