I have the following statements:
const double s=1529340.57;
double f=1-1/1200;
for(j=1;j<=384;j++){
printf("Age %3d month %2d you have $%.2lf\n", (j+816) / 12, (j+816)%12, s*pow(f,j-1)-4000*((pow(f,j-1)-f)/(f-1)-1));
}
and I'm expecting to have the following results:
Age 68 month 1 you have $1526615.02
Age 68 month 2 you have $1523887.20
Age 68 month 3 you have $1521157.11
and so on.
But, I obtained the following output:
Age 68 month 1 you have $-1.#J
Age 68 month 2 you have $-1.#J
Age 68 month 3 you have $-1.#J
Do you know why? Thanks!