Bug 1250909

Summary: Wrong result in financial mode or missing some parameters for computing
Product: Red Hat Enterprise Linux 7 Reporter: Lukas Vacek <lvacek>
Component: gnome-calculatorAssignee: Alexander Larsson <alexl>
Status: CLOSED CURRENTRELEASE QA Contact: Desktop QE <desktop-qa-list>
Severity: unspecified Docs Contact:
Priority: unspecified    
Version: 7.2CC: pschindl, tpelka
Target Milestone: rc   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Whiteboard:
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2018-07-12 09:56:53 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:
Embargoed:

Description Lukas Vacek 2015-08-06 09:37:38 UTC
Description of problem:
Not sure if bug but results with Ctrm, Sln and Syd are different from testcases.
With Ctrm button I guess there is missing compounding period(daily/quarterly/yearly) parameter. If it is not bug, please describe how it is computed and what are expected results

Version-Release number of selected component (if applicable):
gnome-calculator-3.14.1-2.el7.x86_64

How reproducible:
100%

Steps to Reproduce:
1.Start gnome-calculator and Choose Financial mode
2.press [Ctrm] button, 0.0075 for Periodic Interest Rate, 18000 for Future value,8000 for Present value
3.press [Sln] , 8000 for Cost, 900 for Salvage,4 for Life
4. press [Syd] , 8000 for Cost, Enter 900 for Salvage,Enter 6 for Life,Enter 4 for Period

Actual results:
2.108,528988997
3.1775
4.2366,666666667

Expected results:
2. 92.765766065
3. 1183.333333333
4. 1014.29

Additional info:

Comment 1 Matěj Cepl 2015-08-06 12:11:41 UTC
(In reply to Lukas Vacek from comment #0)
> With Ctrm button I guess there is missing compounding period(daily/quarterly/yearly) parameter.

No, it isn't. The calculation is done for periods, no matter which ones, only all input variables must be transformed to use the same unit of time. E.g., in this case I have calculated monthly interest (9% p.a. / 12 = 0.09 / 12 = 0.0075) and so the result should be in month periods.

Comment 3 Petr Schindler 2018-07-12 09:56:53 UTC
I make my calculations (ehm, used online calculators :) ) and found out that in cases of ctrm and sln the calculator produce right numbers 108,528988997 and 1775 respectively. So the testcases are wrong.

In case of Syd the testcase is right and the answer really is 1014.29. And this is already solved (calculator now returns the right number).

So I'm closing this bug as current release as it works right in version gnome-calculator-3.28.1-1.el7.x86_64