      subroutine gaudif(xm1,eb1,xm2,eb2,q) ! berg june 15 1999.
c comparision of two means: gaussian difference test.
c input: two gaussian data points, mean values and error bars.
c ouput: likelihood q  that the discrepancy is due to chance.
      include '../../libs/fortran/implicit.sta'
      include '../../libs/fortran/constants.par'
      sigma=sqrt(eb1**2+eb2**2) 
      xx=+abs(xm1-xm2)/(sigma*sqrt(two))
      q=one-error_f(xx)
      return
      end 
