Re: [PHP] help with Log() function

2003-11-28 Thread Jason Wong
On Saturday 29 November 2003 06:03, Jon King wrote: > I'm having trouble getting a log formula to work. This forumla is supposed > to return the number of payment required zero out a loan balance. > print -(log(1-($B/$m)*($r/$q)))/log(1+($r/$q)); > It keeps returning a NaN. I've checked the sy

[PHP] help with Log() function

2003-11-28 Thread Jon King
Hello, I'm having trouble getting a log formula to work. This forumla is supposed to return the number of payment required zero out a loan balance. /* n = - (LN(1-(B/m)*(r/q)))/LN(1+(r/q)) q = amount of annual payment periods r = interest rate B = principal m = payment amount n = amount payment