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
    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. Advertising

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. NM
    Replies:
    6
    Views:
    465
    Default User
    Sep 20, 2006
  2. Shaguf
    Replies:
    0
    Views:
    349
    Shaguf
    Dec 24, 2008
  3. Shaguf
    Replies:
    0
    Views:
    447
    Shaguf
    Dec 26, 2008
  4. Shaguf
    Replies:
    0
    Views:
    235
    Shaguf
    Dec 26, 2008
  5. Shaguf
    Replies:
    0
    Views:
    214
    Shaguf
    Dec 24, 2008
Loading...

Share This Page