import java.io.*; //java girdi cikti sinifini cagir
import javax.swing.*;
public class f2
{
public static double PI()
{
double a=1.4142135623730951;
double b=0;
double x=2+a;
double t=0;
for(int k=1;k<=5;k++)
{t=Math.sqrt(a);
 b=t*(1+b)/(a+b);
 a=0.5*(t+1.0/t);
 x=x*b*(1+a)/(1+b);
}
return x;
}
public static double sqrt(double x)
{return pow(x,0.5);}
public static double pow(double a,double x)
{double lna=ln(a);
 double total=1.0;
 double fact=1.0;
 double pow=1;
 for(int k=1;k<200;k++)
 {fact*=k;
  pow*=x*lna;
  total+=pow/fact;
 }
 return total;
}
public static double ln(double x)
{   int n=1;
    double x1=(x-1)/(x+1);
    double ln=0;
    double pow=x1;
	for(int k=1;k<200;k++)
    {n=2*k-1;
     ln+=1.0/n*pow;
     pow*=x1*x1;     
    }
    ln*=2.0;
return ln;
}
public static String chararray()
{
char a='\u03B1';
char b='\u03C9';
String s="";
for(char i=a;i<=b;i++) {s+=i;}
return s;
}
public static void main(String x[])
{
JOptionPane.showMessageDialog(null,sqrt(2.0),"======harf listesi======",JOptionPane.PLAIN_MESSAGE);;
}

}