domcu Posted March 29, 2007 Share Posted March 29, 2007 hi, I am trying to write formula in php but two days work and nothing please someone help. Here is formula how look mathematic: here is how look in dynamic: A=((N*(100-d)/100)*r*(1+r/1200)^(12*y))/(1200*((1+r/1200)^(12*y)-1)) here is how I write in php: (($_POST['N']*(100 - $_POST['d'])/100)*$_POST['r']*(1+($_POST['r']/1200)pow(12*$_POST['y'])/(1200*((1+$_POST['r']/1200)*(12*$_POST['y'])-1)); but script don't work... Please help me, Thank you very much and sorry for my english. Quote Link to comment Share on other sites More sharing options...
hitman6003 Posted March 29, 2007 Share Posted March 29, 2007 You are using the pow function incorrectly.... http://www.php.net/pow $N = $_POST['N']; $d = $_POST['d']; $r = $_POST['r']; $y = $_POST['y']; $A = (N * ((100 - $d) / 100) * $r * pow((1 + ($r / 1200)), (12 * $y))) / (1200 * ( pow((1 + ($r / 1200)), (12 * $y)) - 1 )); Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.