future value
Time within a period when a payment is made
Controller: CodeCogs
Interface
C++
Future Value
doublefuture_value( | double | rate | |
int | nper | ||
double | pmt | ||
double | pv | ||
PaymentPoint | when | ) |
References:
http://www.vni.com/products/imsl/jmsl/v30/api/com/imsl/finance/Finance.htmlExample 1
#include <stdio.h> #include <codecogs/finance/banking/future_value.h> int main() { double d = Finance::Banking::future_value(0.05, 20, -30000, -30000, Finance::Banking::pp_StartOfPeriod); printf("30,000 set aside per year\n"); printf("5%% interest compounded yearly\n"); printf("After 20 years, the value of the investment will be: %7.2f\n\n", d); d = Finance::Banking::future_value(0.00, 7, -50, 0, Finance::Banking::pp_StartOfPeriod); printf("50 set aside per year\n"); printf("no interest\n"); printf("After 7 years, the value of the investment will be: %.2f\n", d); return 0; }
Output:30,000 set aside per year 5% interest compounded yearly After 20 years, the value of the investment will be: 1121176.49 50 set aside per year no interest After 7 years, the value of the investment will be: 350.00
pp_StartOfPeriod or pp_EndOfPeriod.
Parameters
rate is the interest rate nper is the number of periods pmt is the amount set aside each period pv is the present value when is the point in each period when the payment is made, either
Returns
- a double, the future value of the investment.
Authors
- James Warren (May 2005)
Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.
Other Documentation
<div align="center"> <table border="0"> <tr align="center"><td width="100"><strong>Type</strong></td><td><strong>Description</strong></td></tr> <tr><td align="center" valign="top"><em>pp_EndOfPeriod</em></td><td>Each payment is made at the end of the period.</td></tr> <tr><td align="center" valign="top"><em>pp_StartOfPeriod</em></td><td>Each payment is made at the start of the period.</td></tr> </table> </div>Source Code
Source code is available when you agree to a GP Licence or buy a Commercial Licence.
Not a member, then Register with CodeCogs. Already a Member, then Login.