Mathematical prob
| From: | Chris Aitken | Date: | Tue, 13 Feb 2001 05:39:13 +0000 |
| Subject: | Mathematical prob | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-39354@lists.php.net to get a copy of this message | ||
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