Bug 120887 - PV function returns wrong answer
Summary: PV function returns wrong answer
Status: CLOSED INVALID
Alias: None
Product: LibreOffice
Classification: Unclassified
Component: Calc (show other bugs)
Version:
(earliest affected)
6.0.0.2 rc
Hardware: x86-64 (AMD64) Mac OS X (All)
: medium normal
Assignee: Not Assigned
URL:
Whiteboard:
Keywords:
Depends on:
Blocks: Calc-Function
  Show dependency treegraph
 
Reported: 2018-10-25 00:12 UTC by Rob Lewis
Modified: 2019-02-26 10:03 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 Rob Lewis 2018-10-25 00:12:25 UTC
Description:
Unless I am misunderstanding something, the Present Value (PV) function returns wildly wrong answers. 
This: PV(0.25,180,626.4,0,0)
gives the answer -$2,505.60
I checked an online calculator and it returned $90,706.15

Steps to Reproduce:
1. Enter the formula =PV(0.25,180,626.4,0,0)
2. 
3.

Actual Results:
-$2,505.60

Expected Results:
Something close to $90,706.15 (perhaps with a minus sign)


Reproducible: Always


User Profile Reset: No



Additional Info:
[Information automatically included from LibreOffice]
Locale: en-US
Module: SpreadsheetDocument
[Information guessed from browser]
OS: Mac OS X (All)
OS is 64bit: no
Comment 1 m.a.riosv 2018-10-25 08:15:27 UTC
Are you sure the parameters are introduced with right values?
0,25 means a 25% a year,
I guess the formula should be:
=PV(25%/12,180,626.4,0,0)= -93.942,73 €

While
=PV(0,0025;180;626,4;0;0)=-90.706,15 €
the same that only calculator

Please take a look to the help:
https://help.libreoffice.org/6.2/en-US/text/scalc/01/04060103.html?System=WIN&DbPAR=CALC&HID=SC_HID_FUNC_BW#bm_id3153072