      real function simple(x) 


      vector pars(7) 

      real x 
      
      real th1, th2, th3
      real s1, s2, s3 
      real c1, c2, c3
      real delta
      real sd, cd
      real jcp 
      real dm12 
      real dm23 
      real dm31 
      real ph1, ph2, ph3 
      real dist 

      real term1, term2, term3, term4 
      real termcp 

c      th1 = 0.5535  
c      th2 = 0.785
c      th3 = 0.100 
c      delta = 0. 
c      delta = 0.785
c      delta = 1.57 
c      dm12 = 6.0e-5
c      dm31 = 2.6e-3 
c      dm32 = 2.6e-3 


      dm12 = pars(1)
      dm31 = pars(2)
      dm32 = pars(2)-dm12 
      th1 = pars(3) 
      th2 = pars(4)
      th3 = pars(5) 
      delta = pars(6) 
      dist = pars(7) 

c      write(6,*) pars
      
      ph1 = 1.27*dm12*dist 
      ph2 = 1.27*dm32*dist
      ph3 = 1.27*dm31*dist 

      s1 = sin(th1)
      s2 = sin(th2) 
      s3 = sin(th3) 
      c1 = cos(th1)
      c2 = cos(th2)
      c3 = cos(th3) 
      sd = sin(delta)
      cd = cos(delta) 

      jcp = s1*s2*s3*c1*c2*c3*c3*sd


      term1 = 4.*(s2*s2*s3*s3*c3*c3 + 
     +           jcp*sin(2.*ph1/x) )*(sin(ph3/x))**2


      term2 = 2.*(s1*s2*s3*c1*c2*c3*c3*cd - s1*s1*s2*s2*s3*s3*c3*c3)*
     +           sin(2.*ph3/x)*sin(2.*ph1/x)

      term3 = 4.*(s1*s1*c1*c1*c2*c2*c3*c3 + s1**4*s2*s2*s3*s3*c3*c3
     +            - 2.*s1**3*s2*s3*c1*c2*c3*c3*cd - jcp*sin(2.*ph3/x))
     +          *(sin(ph1/x))**2 


      term4 = 8.*(s1*s2*s3*c1*c2*c3*c3*cd - 
     +            s1*s1*s2*s2*s3*s3*c3*c3)*(sin(ph3/x)*sin(ph1/x))**2

      termcp = 4.*jcp*sin(2.*ph1/x)*(sin(ph3/x))**2 +
     +         2.*s1*s2*s3*c1*c2*c3*c3*cd*sin(2.*ph3/x)*sin(2.*ph1/x) -
     +         4.*(2.*s1**3*s2*s3*c1*c2*c3*c3*cd + jcp*sin(2.*ph3/x))*
     +            (sin(ph1/x))**2  +
     +         8.*s1*s2*s3*c1*c2*c3*c3*cd*(sin(ph3/x)*sin(ph1/x))**2



      simple  = term1 + term2 + term3 + term4 


      return 
      end 

