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.
<!------- snip ---------------> /* 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 periods LN = natural logarithm */ $q = 12; $r = 0.07; $B = 150000; $m = 733; print -(log(1-($B/$m)*($r/$q)))/log(1+($r/$q)); <--- end snip ----> It keeps returning a NaN. I've checked the syntax over and over, but to no avail. Any help would be appreciated TIA Jon -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php