Jump to content

Archived

This topic is now archived and is closed to further replies.

Quarktoo

Exponent multiplication error in 5.3.3?

Recommended Posts

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?

Share this post


Link to post
Share on other sites

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.

Share this post


Link to post
Share on other sites

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.