public class func1
{
public static double erf(double x)
{
double sum=x;
double pow=x;
double fact=1;
int plus_minus=-1;
for(int n=1;n<100;n++)
{   pow*=(x*x);
	sum+=plus_minus*pow/fact/(2.0*n+1.0);
	fact*=n;
	plus_minus*=-1;
}
sum*=1.0/Math.sqrt(Math.PI);
return sum;	
}
public static String toString(double x[],double y[])
{
String s="";
int w=x.length;
for(int i=0;i<w;i++)
{s+="i= "+i+" "+x[i]+" "+y[i]+"\n";}
return s;	
}

public static void main(String arg[])
{
int k=100;
double x[]=new double[100];
double y[]=new double[100];	
for(int i=0;i<k;i++)
{x[i]=0.05*i;
 y[i]=Math.sin(x[i]);
}
//Plot p=new Plot(x,y);
//p.plot();
System.out.println(toString(x,y));
}

}