PHP - 我的代码有什么问题?

I have this original formula from a medical research book:

Log(e) (EFW) = (-4.564+(0.282*AC)-(0.00331*AC^2))*1000

EFW (grams), AC (cm)

this is what i did:

$ac = 291; // (mm)
$w = log(-4.564+(0.282*($ac/10))-(0.00331*pow(($ac/10),2)))*1000);
echo "result: " . $w;


result: 6.7

the result should be between 1900-2500 grams, but not 6.7 grams. I do not have any clue what is wrong here? would you please take a look for me, Thank you!

Edit: I would like to have the result in gramm, and my AC is in mm

  • if Log( result ) == expr
  • then result == exp( expr )

http://codepad.org/yVmzaToZ

Code:

$ac = 291; // (mm)
$w = exp(
  -4.564
  +(0.282*($ac/10))
  -(0.00331*pow(($ac/10),2))
)*1000;
echo "result: " . $w;

Result:

result: 2314.6509531657

Which is between 1900-2500 :)