Bug 100542 - CUMIPMT function, type parameter
Summary: CUMIPMT function, type parameter
Status: RESOLVED DUPLICATE of bug 100646
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
unspecified
Hardware: All All
: medium normal
Assignee: Winfried Donkers
URL:
Whiteboard:
Keywords:
Depends on:
Blocks:
 
Reported: 2016-06-22 11:02 UTC by raal
Modified: 2016-07-05 15:08 UTC (History)
1 user (show)

See Also:
Crash report or crash signature:


Attachments
extra use cases for CUMIPMT unit test (3.32 KB, application/vnd.oasis.opendocument.spreadsheet)
2016-07-01 09:52 UTC, Winfried Donkers
Details

Note You need to log in before you can comment on or make changes to this bug.
Description raal 2016-06-22 11:02:30 UTC
ODFF: CUMIPMT
Summary: Calculates a cumulative interest payment.
Syntax: CUMIPMT( Number rate ; Number periods ; Number value ; Integer start ; Integer end ; Integer type )
Returns: Currency
Constraints: rate > 0; value > 0; 1 <= start <= end <= periods"

=CUMIPMT(0,055/12;24;5000;4;6;-1) -> returns -57,80  , should return #error because type is 0 or 1
=CUMIPMT(0,055/12;24;5000;4;6;) -> returns -57,80  , should return #error because type is 0 or 1 and not optional parameter

Checked in excel and excel return in both cases error.
Comment 1 Eike Rathke 2016-06-28 16:54:44 UTC
Just a remark about "6;)" and "not optional parameter": these either consecutive ;; semicolons or, if at end, ;) semicolon followed by closing parenthesis, are not optional parameters, but omitted arguments. The difference is that they are given but as empty argument. Some functions (I don't recall off-hand which) may act differently if a parameter is specified as empty argument, or not specified at all.
Comment 2 Winfried Donkers 2016-07-01 09:52:06 UTC
Created attachment 126020 [details]
extra use cases for CUMIPMT unit test

Attachments shows the use cases I tested with the fixed code.
Comment 3 Winfried Donkers 2016-07-05 15:08:40 UTC

*** This bug has been marked as a duplicate of bug 100646 ***