limits.h
specifies limits for non-floating point math types, e.g. INT_MIN
and INT_MAX
. These values are the most negative and most positive values that you can represent using an int.
In float.h
, there are definitions for FLT_MIN
and FLT_MAX
. If you do the following:
NSLog(@"%f %f", FLT_MIN, FLT_MAX);
You get the following output:
FLT_MIN = 0.000000, FLT_MAX = 340282346638528859811704183484516925440.000000
FLT_MAX
is equal to a really large number, as you would expect, but why does FLT_MIN
equal zero instead of a really large negative number?