i am passing variables pv,rte,yrs to pgm.
BEGIN {printf ("%4.3f",(pv * rte)^yrs)} #this works passing
pv = 887.10,rte=1.04,yrs=3.
aNS = 1000.this gives future value.
this does not; BEGIN {printf ("%4.3f",(pv / rte)^yrs)}
this should give the original pv(887.10)
using pv = 1000,rte=1.04,yrs=3 giving the approximate answer.
i get zero divide.i can't see the forest for the trees.
BEGIN {printf ("%4.3f",(pv * rte)^yrs)} #this works passing
pv = 887.10,rte=1.04,yrs=3.
aNS = 1000.this gives future value.
this does not; BEGIN {printf ("%4.3f",(pv / rte)^yrs)}
this should give the original pv(887.10)
using pv = 1000,rte=1.04,yrs=3 giving the approximate answer.
i get zero divide.i can't see the forest for the trees.