#include /* C example */ #include #include /* for INT_MIN, INT_MAX */ #include /* for DBL_MAX, DBL_DIG */ int main() { double d = 123456789012345678.0; printf("Minimum int is %d.\n", INT_MIN); printf("Maximum int is %d.\n\n", INT_MAX); printf("Maximum double is %g.\n", DBL_MAX); printf("A double has a %d-bit mantissa.\n", DBL_MANT_DIG); printf("A double can hold %d decimal significant digits.\n", DBL_DIG); printf("%.*g\n", DBL_DIG + 3, d); return EXIT_SUCCESS; }