¡@

Home 

php Programming Glossary: fv

Recreate Excel RATE function using Newton's Method

http://stackoverflow.com/questions/3198939/recreate-excel-rate-function-using-newtons-method

'FINANCIAL_PRECISION' 1.0e 08 function RATE nper pmt pv fv 0.0 type 0 guess 0.1 rate guess if abs rate FINANCIAL_PRECISION.. FINANCIAL_PRECISION y pv 1 nper rate pmt 1 rate type nper fv else f exp nper log 1 rate y pv f pmt 1 rate type f 1 fv y0.. fv else f exp nper log 1 rate y pv f pmt 1 rate type f 1 fv y0 pv pmt nper fv y1 pv f pmt 1 rate type f 1 fv find root by..