Evaluates the future value of an initial principal taking into consideration a schedule of compound interest rates.
#include <imsl.h>
float
imsl_f_future_value_schedule (float principal, int count,
float schedule[])
The type double function is imsl_d_future_value_schedule.
float principal
(Input)
Principal or present value.
int count
(Input)
Number of interest rates in schedule.
float
schedule[] (Input)
Array of size count of interest
rates to apply.
The future value of an initial principal after applying a schedule of compound interest rates. If no result can be computed, NaN is returned.
Function imsl_f_future_value_schedule computes the future value of an initial principal after applying a schedule of compound interest rates.
It is computed using the following:

where schedulei = interest rate at the ith period.
In this example, imsl_f_future_value_schedule computes the value of a $10,000 investment after 5 years with interest rates of 5%, 5.1%, 5.2%, 5.3% and 5.4%, respectively.
#include <stdio.h>
#include "imsl.h"
void main()
{
float principal = 10000.0;
float schedule[5] = { .050, .051, .052, .053, .054 };
float fvschedule;
fvschedule = imsl_f_future_value_schedule (principal, 5, schedule);
printf ("After 5 years the $10,000 investment will have grown ");
printf ("to $%.2f.\n", fvschedule);
}
After 5 years the $10,000 investment will have grown to $12884.77.
|
Visual Numerics, Inc. PHONE: 713.784.3131 FAX:713.781.9260 |