public class gamma1
{
public static double E=0.57721566490153286060651209008240243104215933593992;
public static double gamma(double t)
{
double mult=1.0;
for(int n=1;n<20&&mult>1e-100;n++)
{mult*=Math.exp(t/n);
 System.out.println("n="+n+"mult="+mult);
 mult/=(1.0+t/n);
}
double n1=Math.exp(-E*t);
double n2=t;
double n3=n1/n2;
if(n2<1e-30 && n2>=0) n3=1e30;
mult*=n3;
return mult;
}
public static void main(String arg[])
{ double xmin=-5.0;
  double   dx=0.1;
  double xmax=5.0;
  int n=(int)((xmax-xmin)/dx+0.00000000000001);
  double x[]=new double[n+1];
  double y[]=new double[n+1];
  for(int i=0;i<=n;i++)
  {x[i]=xmin+dx*i;
   y[i]=gamma(x[i]);
   System.out.println(x[i]+" "+y[i]);
  }
  Plot p=new Plot(x,y);
  p.plot();
}
}