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 -
Below is the code in java:
double pmt = ((pv - fv) * ir / (1 - Math.pow((1 + ir), -np)));