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

Discussion in 'C Programming' started by ericnoonan, Dec 14, 2009.

  1. ericnoonan

    ericnoonan

    Joined:
    Nov 10, 2009
    Messages:
    2
    Likes Received:
    0
    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
     
    ericnoonan, Dec 14, 2009
    #1
    1. Advertisements

Want to reply to this thread or ask your own question?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.
Similar Threads
  1. Leif K-Brooks
    Replies:
    25
    Views:
    875
    Rob McAninch
    Jul 15, 2003
  2. Ross Reyes
    Replies:
    17
    Views:
    1,061
    Mike Meyer
    Nov 21, 2005
  3. NM
    Replies:
    6
    Views:
    714
    Default User
    Sep 20, 2006
  4. venkatagmail
    Replies:
    11
    Views:
    955
    James Kanze
    Oct 3, 2007
  5. Shaguf
    Replies:
    0
    Views:
    780
    Shaguf
    Dec 24, 2008
  6. Shaguf
    Replies:
    0
    Views:
    672
    Shaguf
    Dec 26, 2008
  7. Shaguf
    Replies:
    0
    Views:
    428
    Shaguf
    Dec 26, 2008
  8. Shaguf
    Replies:
    0
    Views:
    429
    Shaguf
    Dec 24, 2008
Loading...