max precision in float

Hi,

As all of us know that size of int is machine as well as compiler dependent
we can get the range and size of an int , float and char etc in

/usr/include/limits.h

header file of a compiler

but could any one tell me how to get info of precision of float and double
data type in a perticular compiler ?

thanks

This should do the trick... Enquire.c

Or look in limits.h yourself for FLT_DIG and DBL_DIG

On POSIX-compliant UNIX boxes POSIX requires those to be at least

FLT_DIG 6
DBL_DIG 15

but i did not get this in limits.h

(a) what platform / compiler are you using?

(b) did "enquire.c" work for you?

(c) it does not have to come from limits.h, however if limits.h is included you should have it.

linux , GNU C compiler

try #include <float.h>