shaijuelayidath Posted September 5, 2012 Share Posted September 5, 2012 I have a doubt from the 'W3Schools' JS Tutorials, It is given below. The 'var y=123e5' produces 12300000.And 'var z=123e-5' produces 0.00123I did'nt understand what 'e5' and 'e-5' are stands for and how formed 12300000 from '123e5'and 0.00123 from '123e-5' ? The code given below. <script type="text/javascript">{var y=123e5;var z=123e-5;document.write(y+"<br/>"+z);}</script> 1 Link to comment Share on other sites More sharing options...
Ingolme Posted September 5, 2012 Share Posted September 5, 2012 It's a short form of scientific notation used in floating point numbers. The e represents 10 elevated to the number that follows it. 5e6 is the same as 5 * 106 or 5 * 1,000,000 = 5,000,000 1 Link to comment Share on other sites More sharing options...
shaijuelayidath Posted September 5, 2012 Author Share Posted September 5, 2012 can you give me any reference site to study scientific notations Link to comment Share on other sites More sharing options...
Ingolme Posted September 5, 2012 Share Posted September 5, 2012 This is scientific notation: http://en.wikipedia.org/wiki/Scientific_Notation Link to comment Share on other sites More sharing options...
zinnira Posted May 25, 2020 Share Posted May 25, 2020 var z=123e-5' produces 0.00123I take "e" as "10*" so 123e5 will be taken as 123 x 10*5 = 12300000 similary "e-" will be taken as "/10" so 123e-5 becomes 123x 1/20*5 = 123/100000 = 0.00123 Link to comment Share on other sites More sharing options...
Ingolme Posted May 26, 2020 Share Posted May 26, 2020 Please do not reply to old topics. Link to comment Share on other sites More sharing options...
Recommended Posts
Create an account or sign in to comment
You need to be a member in order to leave a comment
Create an account
Sign up for a new account in our community. It's easy!
Register a new accountSign in
Already have an account? Sign in here.
Sign In Now