Thread: what is the precision and max value of double and long double?

  1. #1
    Registered User
    Join Date
    Nov 2016
    Posts
    18

    what is the precision and max value of double and long double?

    hi as the title of the thread says i don't know how to get the precision and max value of double and long double. if I'm not mistaken (this is from a long time ago) by including the limits.h you can find out but i read the file and no luck. i just need to know the exact precision of double and long double how can i get that?

  2. #2
    and the hat of int overfl Salem's Avatar
    Join Date
    Aug 2001
    Location
    The edge of the known universe
    Posts
    39,661
    If you dance barefoot on the broken glass of undefined behaviour, you've got to expect the occasional cut.
    If at first you don't succeed, try writing your phone number on the exam paper.

  3. #3
    Registered User
    Join Date
    Jun 2015
    Posts
    1,640
    limits.h is just for integers. float.h is for floats.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Replies: 16
    Last Post: 06-07-2015, 03:28 PM
  2. Double precision is not correct
    By Ilyas Patanam in forum C Programming
    Replies: 5
    Last Post: 06-24-2011, 01:25 AM
  3. extended vs double precision
    By Lind in forum C Programming
    Replies: 2
    Last Post: 09-19-2007, 02:02 PM
  4. Replace double with long double in all my code.
    By boyfarrell in forum C Programming
    Replies: 8
    Last Post: 04-30-2007, 04:17 PM
  5. More precision than a double
    By manutd in forum C++ Programming
    Replies: 6
    Last Post: 11-01-2006, 06:49 AM

Tags for this Thread