Velocity Reviews - Computer Hardware Reviews

Velocity Reviews > Newsgroups > Programming > C++ > What happens if adding a very big value and a very small value?

Reply
Thread Tools

What happens if adding a very big value and a very small value?

 
 
ericnoonan ericnoonan is offline
Junior Member
Join Date: Nov 2009
Posts: 2
 
      12-14-2009
For example: 3e19 + 0.0001

Will this code be excuted really?

I watch a variable in GDB, but can not stop when this is excuted.

double a = 3e19;
double b = 0.0001;
a = a + b;

awatch a
 
Reply With Quote
 
 
 
Reply

Thread Tools

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net 0 12-26-2008 09:29 AM
GIDS 2009 .Net:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf ASP .Net Web Controls 0 12-26-2008 06:11 AM
GIDS 2009 Java:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf Python 0 12-24-2008 07:35 AM
GIDS 2009 Java:: Save Big, Win Big, Learn Big: Act Before Dec 29 2008 Shaguf Ruby 0 12-24-2008 05:07 AM
What happens when type conversion between signed and unsigned happens? NM C++ 6 09-20-2006 05:39 PM



Advertisments