
#include <limits.h>
#include <stdio.h>

int main() {
  int x = INT_MAX;
  int y = x + 1;
  printf("x=%d, y=%d\n",x,y);

  x = INT_MIN;
  y = x / (-1);
  printf("x=%d, y=%d\n",x,y);

  /**/
  float x1 = 2.0;
  float x2 = x1*x1;
  float x4 = x2*x2;
  float x8 = x4*x4;
  float x16 = x8*x8;
  float x32 = x16*x16;
  float x64 = x32*x32;
  float x128 = x64*x64;

  printf("x64=%f, x128=%f\n",x64,x128);
  /**/

  /**/
  x1 = 1.0 / 0.0;
  printf ("x1=%f\n",x1);
  x1 = 1.0 / (-0.0);
  printf ("x1=%f\n",x1);
  x1 = 0.0 / 0.0;
  printf ("x1=%f\n",x1);

  /**/

  /**/
  float y1 = 0.1;
  float y2 = 0;
  for (x=0; x < 30; x++) { y2 += y1; printf("y2=%1.10f\n",y2); }
  /**/

  /**/
  y2 = 2097150.0 ;
  for (x=0; x < 30; x++) { y2 += y1; printf("y2=%1.10f\n",y2); }
  /**/

  return 0;
}



/*
Local Variables:
compile-command: "gcc arith.c && ./a.out"
End:
*/
