attached is a XIDE viaef (foxpro dialect) which implements the funcs:
FUNCTION FV ( nPayment AS FLOAT , nInterestRate AS FLOAT , nPeriods AS FLOAT ) AS FLOAT
FUNCTION Payment( nPrincipal AS FLOAT , nInterestRate AS FLOAT , nPayments AS FLOAT ) AS FLOAT
FUNCTION PV ( nPayment AS FLOAT , nInterestRate AS FLOAT , nTotalPayments AS FLOAT ) AS FLOAT
it seems that these funcs are not often used. At least, i have found only a few references. The site https://hackfox.github.io/section4/s4g052.html describes some pitfalls. What´s missing there is the description of another strange behaviour: If the third parameter has decimal places, VFP rounds up/down the value ...
The results you see in the X# console should be equal to the results you see when you run this code with VFP:
attached is a XIDE viaef (foxpro dialect) which implements the funcs:
it seems that these funcs are not often used. At least, i have found only a few references. The site https://hackfox.github.io/section4/s4g052.html describes some pitfalls. What´s missing there is the description of another strange behaviour: If the third parameter has decimal places, VFP rounds up/down the value ...
The results you see in the X# console should be equal to the results you see when you run this code with VFP:
BTW. I´m not a financial mathematic, so don't ask me about the details of the formulas used ;-)
Karl-Heinz
VFPFinancal.zip