• Post Reply Bookmark Topic Watch Topic
  • New Topic

E-4 double value  RSS feed

 
kri shan
Ranch Hand
Posts: 1489
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
13.61234567891234  Vs 13.61234567891234E-4 double value



double d = 13.61234567891234;   d is greater than 10


double d = 13.61234567891234E-4;  d is less than 10
 
Stephan van Hulst
Saloon Keeper
Posts: 7976
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Yes, that's correct. Do you have a question?
 
kri shan
Ranch Hand
Posts: 1489
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why 13.61234567891234E-4  d is less than 10 ?    How to remove E-4 from the double value ?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kri shan wrote:Why 13.61234567891234E-4  d is less than 10 ?    How to remove E-4 from the double value ?


Do you know how scientific notation works?

Henry

 
kri shan
Ranch Hand
Posts: 1489
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
How to convert to 13.61234567891234 from 13.61234567891234E-4 ?
 
Stephan van Hulst
Saloon Keeper
Posts: 7976
143
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
That's kind of like asking how to convert from 1 to 2. They are different values.

Why do you want to do this?
 
Henry Wong
author
Sheriff
Posts: 23295
125
C++ Chrome Eclipse IDE Firefox Browser Java jQuery Linux VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
kri shan wrote:How to convert to 13.61234567891234 from 13.61234567891234E-4 ?


To get 13.61234567891234 from 13.61234567891234E-4, you would have to multiply by 10000. And technically, it is not "converting" as those are two different numbers.

Henry
 
Carey Brown
Saloon Keeper
Posts: 3315
46
Eclipse IDE Firefox Browser Java MySQL Database VI Editor Windows
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
13.61234567891234E-4
essentially means, take the value
13.61234567891234
and move the decimal point 4 spaces to the left, yielding
0.001361234567891234
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!