Are you quite sure that the answer is not in fact 93.73? And that your formula is truly correct?
Simplified:-
Code:
function fvg() {
var p = 0;
var g = 10;
var i = 10;
var n = 10;
p = g * (1 / (i /100));
p = p - (n / (Math.pow((1 + (i/100)), n) - 1));
p = Math.round(p*100)/100;
alert (p); // 93.73
}
As g occurs only in one line I do not see how it can be wrong if 3.73 is correct when g = 1.
Sampson was a strong man who let himself be led astray by a Jezebel, like Delilah. - Pupil's answer to Catholic Elementary School test.