Re: Mathematical prob

From: Date: Tue, 13 Feb 2001 06:06:48 +0000
Subject: Re: Mathematical prob
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-39361@lists.php.net to get a copy of this message
On Tue, 13 Feb 2001 16:09, Chris Aitken wrote: > Okay, im a little stumped. I have been asked to use a formula which > calculates Monthly Repayments on a mortgage loan. The formula I have > been given is > > M = P * ( J / (1 - (1 + J) ** -N)) > > My problem is, the last part. It explains it in english as "then take > that to the -N (minus N) power" > > My problem is, I have no idea how to put this into a PHP script so that > it can calculate it out. I have a feeling im falling short at the "to > the power of" part. I tried to do a 3 to the power of 3 calculation and > I cant get it to spit out 27 like I know it should. > > Any suggestions ? > > > Thanks > > > Chris Check out exp() and pow() -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#39361) next »