Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Doubles doing my head in!

Status
Not open for further replies.

titanzero

Programmer
May 3, 2007
30
EU
Hello everybody.

When I write the code...

Code:
cout << 83865.5657 / 0.01;

...it outputs 8.38656e+006 yet when I do it with Windows Calculator I get 8386556.57. Why is this? I'm not very good at maths and don't really understand what the e+006 on the end of my result means. Also not being very good at maths I can't work out why I get different results. Also is it possible to out put the result without the e+006 notation on the end?

Thanks for you help
Andrew
 
That's exponential notation.
The +6 means: to view it in normal form, move the decimal point right 6 digits.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top