/* computing infinity */

#include <stdio.h>

int main () {
  double old_sum, sum;

  printf ("This program adds 1.0 to a sum until the sum stops changing.\n");

  sum = 0.0;    /* to save time, start with 9007199000000000.0 */
  do {
    old_sum = sum;
    sum += 1.0;
  } while (sum != old_sum);

  printf ("The sum stopped chaning when it reached the value %lf\n", sum);
}

