Example—PV function:
/* You are thinking about buying an insurance annuity
** which pays $400 per month for next 20 years. You
** expect to earn 8% per year on the payments. The
** annuity costs $50,000. Is it a good deal?
** Calculate the Present Value and compare to cost of
** annuity.
*/
PresentValue = pv(pmt = 400,
i = .08/12,
nper = 12*20);
/* Note that PresentValue is negative indicating a
** cash outflow
*/
if abs(PresentValue) < 50000 then
message 'Not such a good deal';
endif;