/************************************************************************ **underflow.c -- A sample source that llustrates an underflow error-- *** ************************************************************************/ #include #include /*Divides a number repeatedly by itself.*/ void divide(float x) { int count = 0; float y=x; while (count <25) { /*count increments by 1.*/ count = count + 1; /*Division of the current value of "y"(the current quotient) by the value of "x"(the orginal divisor).*/ y=y/x; /*Output to the standard output device the value of "y".*/ printf("%f \n",y); } } /*Prototype main function*/ int main(int argc, char *argv[]) { /*Conversion of command line argument to a floating point number.*/ float i = atof(argv[1]); /*Call to the function "divide()".*/ divide(i); /*Return to O.S.*/ return 0; }