Bug 100721 - PPMT function, Type parameter; Constraints: Rate and Present
Summary: PPMT function, Type parameter; Constraints: Rate and Present
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-07-01 11:50 UTC by raal
Modified: 2016-07-04 17:41 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-07-01 11:50:42 UTC
ODF definition:
PPMT
Summary: Calculate the payment for a given period on the principal for an investment at a given interest rate and constant payments.
Syntax: PPMT( Number Rate ; Integer Period ; Integer nPer ; Number Present [ ; Number Future = 0 [ ; Number Type = 0 ] ] )
Returns: Number
Constraints: Rate and Present should be greater than 0. 0<Period <nPer.
Semantics: The parameters are
Rate: the interest rate
Period: the given period that the payment returned is for
nPer: the total number of periods
Present: the present value
Future: optional, the future value specified after nPer periods. The default value is 0.
Type: optional, 0 or 1, respectively for payment at the end or at the beginning of a period. The default value is 0.


=PPMT(0.0875/12,1,36,5000,8000,3)  should be error-> Type: optional, 0 or 1
=PPMT(0.0875/12,1,36,-5000,8000,1)  should be error->  Constraints: Rate and Present should be greater than 0.
=PPMT(-0.005,1,36,5000,8000,1)    should be error->  Constraints: Rate and Present should be greater than 0.
Comment 1 Joel Madero 2016-07-03 16:06:54 UTC
> =PPMT(0.0875/12,1,36,5000,8000,3)  should be error-> Type: optional, 0 or 1
> =PPMT(0.0875/12,1,36,-5000,8000,1)  should be error->  Constraints: Rate and
> Present should be greater than 0.
> =PPMT(-0.005,1,36,5000,8000,1)    should be error->  Constraints: Rate and
> Present should be greater than 0.

Each of these formulas work in Office 2013. Maybe the definition is just wrong.
Comment 2 Eike Rathke 2016-07-04 17:41:19 UTC
Also in Gnumeric, though it produces slightly different results.
Type again should be Logical Type = FALSE().
No idea about the context of Rate and Present. Note that the constraint reads *should* be greater than 0, which is not a normative *shall* in the sense of must. See also http://docs.oasis-open.org/office/v1.2/os/OpenDocument-v1.2-os-part2.html#__RefHeading__1017852_715980110

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