PMT in Javascript

前端 未结 4 1780
无人及你
无人及你 2021-01-13 19:15

I am trying to code the equivalent to the EXCEL PMT function.

in JavaScript, the formula looks like this:

function PMT (ir, np, pv, fv ) {
 /*
 ir -          


        
4条回答
  •  野的像风
    2021-01-13 19:28

    Below is the code in java:

    double pmt = ((pv - fv) * ir / (1 - Math.pow((1 + ir), -np)));
    

提交回复
热议问题