Quarktoo Posted July 19, 2013 Share Posted July 19, 2013 Why do php and excel come up with two different answeres for the same equation? In php: $a = 6.67*10E-8; echo $a The answer I get in php is 6.67E-7 In excel: =6.67 * 10^-8 The answer I get in Excel is 6.67E-08 What up? Link to comment https://forums.phpfreaks.com/topic/280323-exponent-multiplication-error-in-533/ Share on other sites More sharing options...
AbraCadaver Posted July 19, 2013 Share Posted July 19, 2013 echo 6.67 * pow(10, - Link to comment https://forums.phpfreaks.com/topic/280323-exponent-multiplication-error-in-533/#findComment-1441413 Share on other sites More sharing options...
requinix Posted July 19, 2013 Share Posted July 19, 2013 Because you wrote two different numbers. Ex notation is short for *10^x, so when you write 10E-8 you're actually writing 10*10^-8 = 10^-7 = 1E-7. Link to comment https://forums.phpfreaks.com/topic/280323-exponent-multiplication-error-in-533/#findComment-1441432 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.