on-internet
← Community

floats smaller than FLT_MIN. why FLT_TRUE_MIN?

Stack Overflow ·

In an attempt to see what would happen in the case of a float underflow I found that I could make float numbers much smaller than FLT_MIN. I'm using xcode 5.1 on OS 10.9. The language dialect is gnu99. #include <stdio.h> #include <stdlib.h> #include <float.h> int main(int argc, const char * argv[]) { float underflow = FLT_MIN * 0.0000004; printf("Float min is %f or %e.\nUnderflow is %f or %e\nMin float exp is %d.\n", FLT_MIN, FLT_MIN, underflow, underflow, FLT_MIN_10_EXP); return 0; } Prints: Float min is 0.000000 or 1.175494e-38. Underflow is 0.000000 or 4.203895e-45 Min float exp is -37. Is

Comments

Sign in or sign up to comment and upvote.

No comments yet.