I'm working with C, I have to do an exercise in which I have to print the value of long double min
and long double max
.
I used float.h
as header, but these two macros (LDBL_MIN/MAX
) give me the same value as if it was just a double.
I'm using Visual Studio 2015 and if I hover the mouse on LDBL MIN
it says #define LDBL_MIN DBL_MIN
. Is that why it prints dbl_min
instead of ldbl_min
?
How can I fix this problem?
printf("Type: Long Double Value: %lf Min: %e Max: %e Memory:%lu\n",
val10, LDBL_MIN, LDBL_MAX, longd_size);
It is a problem because my assignment requires two different values for LDBL
and DBL
.