matlabexponentiation

10e5 == 10^5 is not true in MATLAB, why?


If you type in

    10e5 == 10^5  
  ans =  
    logical  
     0

so 10e5 does NOT mean 10 to the power of 5 but it means 10 to the power of 6.

10e5 == 10^6  
ans =  
  logical  
   1

What does 10e5 mean then? Is it somewhere in the documentation? I just can't seem to find it, I've been looking for it for quite some time now.

Thanks for the help!


Solution

  • "1e5" means "1 times ten to the power of 5", so "10e5" means "10 times ten to the power of 5" which is equal to 10^6 or 1e6.