/* ---------------------------------------------------------------------- // Figure 8.6: Floating point underflow. // ---------------------------------------------------------------------- // This program continually divides a number by 100 until the result // is too small to store as a normalized float. */ #include void main( void ) { int N; float frac = 1.0; puts( "\n Dividing by 10; frac=1/(10 to the Nth power) \n" ); for (N = 0; N < 25; ++N) { printf( " N=%3i frac= %13.8g 1+frac= %13.8g\n", N, frac, 1+frac ); frac = frac / 10; } }