      PROGRAM eton 
*************************************************************************
* Conversion of dielectric functions to optical constant.               *
* the standard input file must have the format x eps1 eps2              *
* The outputfile comes as: x  n1  n2                                    *
*************************************************************************
      REAL X(100000),e1,e2
      complex epsil(100000),cn
      INTEGER I,mm    
      mm=100000 
      do 10 i=1,mm                                                  
       READ(*,*,END=11) X(i),e1,e2
       epsil(i)=cmplx(e1,e2)
10    continue   
11    mm=i-1
      do 25 i=1,mm
       cn=csqrt((epsil(i)))
       write(*,*) x(i),real(cn),aimag(cn)
25    continue
      END  

