• Post Reply Bookmark Topic Watch Topic
  • New Topic

Max value of double?  RSS feed

 
Guy Belpa
Ranch Hand
Posts: 41
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
my code,

double a=12345678;
double b=0.11;
System.out.println("tot = "+(a+b));

result is...
run-main:
tot = 1.234567811E7


why this 'E'???
thanks in advace
 
Campbell Ritchie
Marshal
Posts: 56553
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
E is standard shorthand for multiplied-by-ten-to-the-power-of. I think it is short for exponent. The API explains how the format is chosen.
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!