import static java.lang.Math.*;
import java.io.*;
import java.util.*;
import javax.swing.*;
import javax.swing.table.*;
import java.awt.*;
@FunctionalInterface
interface cf_x 
{     
public complex func(complex x);
//conversion method if_x to f_x(abstract class)
  default public complex dfunc(complex x)
  { // complex sayısal türev fonksiyonu
   double hh=0.001563465314;
   complex h=new complex(hh,hh);
   complex he=new complex(-hh,-hh);
   complex h2=new complex(2.0*hh,2.0*hh);
   complex he2=new complex(-2.0*hh,-2.0*hh);
   complex xah=complex.add(x,h);
   complex xa2h=complex.add(x,h2);
   complex xeh=complex.add(x,he);
   complex xe2h=complex.add(x,he2);
   complex fe2h=complex.multiply(func(xe2h),(1.0/12.0));
   complex feh=complex.multiply(func(xeh),(-8.0/12.0));
   complex fah=complex.multiply(func(xah),(8.0/12.0));
   complex fa2h=complex.multiply(func(xa2h),(-1.0/12.0));
   complex df=complex.add(fe2h,complex.add(feh,complex.add(fah,fa2h)));
   df=complex.divide(df,h);
   return df;
  }
}

