Stooney Posted March 26, 2007 Share Posted March 26, 2007 i have the following formula: $rating = -(ln(($points/2894) - 1) - 5.56)/0.0025; that formula is the reverse engineer of another one i had someone do, I dont personally know the math. According to him the ln "is the natural logarithm. i.e. log to the base e." whatever that means. Anyone know what a php alternative for this 'ln' is? Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 26, 2007 Share Posted March 26, 2007 PHP has a natural logarithm function named log(), so the line would be written: <?php $rating = -(log(($points/2894) - 1) - 5.56)/0.0025; ?> Ken Quote Link to comment Share on other sites More sharing options...
Stooney Posted March 26, 2007 Author Share Posted March 26, 2007 im getting 'NAN' with the following: $nrating = -(log(($goal/2894) - 1) - 5.56)/0.0025; i made sure that $goal is getting a value. (i used 600) am i missing something? 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.