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 syntax over and over, but to no > avail. Breakup your calculation into little steps to see where your error lies. Have to tried entering the above calculation into a real calculator? I believe your problem is that you cannot log() a negative number. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* Algol-60 surely must be regarded as the most important programming language yet developed. -- T. Cheatham */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php