Thread: Dbl_min?

  1. #1
    Registered User
    Join Date
    Oct 2002
    Posts
    33

    Dbl_min?

    I asked for DBL_MAX the other day and the compilation and execution went fine, but when I tried to print DBL_MIN I got
    2.22507e-308, a positive number. Here is the entire output to the code below it:


    2.22507e-308
    1.79769e+308

    ---------------------


    Code:
    
    #include <iostream>
    #include <cfloat>
    
    int main()
    {
      std::cout<<DBL_MIN<<"\n"<<  DBL_MAX;
      cin>>"i";
     
      return 0;
    }

    I'm trying to get DBL_MIN to print. By the way, I use the Dev c++ version 4.9.6.0 (Copyright Bloodshed software) compiler...just mentioning incase it is related.
    Last edited by m712; 10-21-2002 at 01:26 AM.

  2. #2
    Registered User moi's Avatar
    Join Date
    Jul 2002
    Posts
    946

    Re: Dbl_min?

    Originally posted by m712

    I'm trying to get DBL_MIN to print.
    and congratulations, as you have succeeded in doing so

    as you may have guessed by now, DBL_MIN is not the smallest number you can hold in a double; it is the smallest positive number you can hold in a double. I believe the smallest number you can hold in a double is assumed to be -DBL_MAX.
    hello, internet!

Popular pages Recent additions subscribe to a feed