behnampmdg3 0 Posted April 27, 2015 HelloI have simple math formula I wanna convert to PHP, but for some weird reason I can't!(X*X)*(3X)=1200Its should be easy to calculate it on paper but how can I convert this to PHP? Maybe it's too simple and my retardness has poped!Maybe something like? pow($y, 3)= 1200/3 Still not sure how to get thew reply from that. Thanks Quote Share this post Link to post Share on other sites
requinix 813 Posted April 27, 2015 Just because it uses the same = symbol doesn't mean it works the same way. Take the number 1200, divide by 3, then assign the result to the result of the function call pow($y, 3)That does not make sense. Rewrite the expression in terms of X alone. Meaning you have to end up at X = .... Quote Share this post Link to post Share on other sites
racken 6 Posted August 8, 2015 surely its just $x=240 ? (X*X)*(3X)=1200 => 5X=1200 => X=240 why do you need this in php? Quote Share this post Link to post Share on other sites
Barand 1,390 Posted August 8, 2015 // pow($x, 3) == 1200/3; // therefore $x = pow(1200/3 , 1/3); echo $x; //--> 7.3680629972808 (not 240, but close) to confirm echo 3 * 7.3680629972808 * 7.3680629972808 * 7.3680629972808; // --> 1200 Quote Share this post Link to post Share on other sites