stebut08 Posted July 27, 2013 Share Posted July 27, 2013 (edited) Hi, I have an issue with pow() function. The formula i'm trying to solve is pow(0.4723*7.73,0.8015), the result returned is 2.82332938169. However, it should return 2.43272943501. I have tested on scientific calculator and the correct result is 2.43272943501. I tried to solve the formula with exponent of 1 rather than 0.8015 to see if this is causing the issue. I was able to return the correct result using 1, the answer returned matched scientific calculator. I'm unsure why the exponent value 0.8015 is not working. Thank you in advance for your help and support. Kind regards, Edited July 27, 2013 by stebut08 Quote Link to comment https://forums.phpfreaks.com/topic/280575-pow-error/ Share on other sites More sharing options...
kicken Posted July 27, 2013 Share Posted July 27, 2013 Google seems to agree with PHP: 2.82332938169 I think you are either entering the formula incorrectly in your calculator, or you are translating it to PHP incorrectly. The answer you are expecting to get would be given by: 0.4723*pow(7.73, 0.8015); Quote Link to comment https://forums.phpfreaks.com/topic/280575-pow-error/#findComment-1442434 Share on other sites More sharing options...
Solution stebut08 Posted July 27, 2013 Author Solution Share Posted July 27, 2013 Hi Kicken, Thanks for your reply, much appreicated. Your proposed solution worked. Thanks. Quote Link to comment https://forums.phpfreaks.com/topic/280575-pow-error/#findComment-1442437 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.