anchor.diff:  
   ! Local variables
   double precision :: s, m
  +double precision, parameter :: eps = 1.0d-30
   
   ! Initialize variables
   ierr = 0
  
positive.code: 
  function coefvar(values,nvalues,ierr)
  !----
  ! Calculate coefficient of variation of a set of values
  !----
  
  implicit none
  
negative.code: 
  ! Calculate mean
  m = mean(values,nvalues,ierr)
  if (abs(m).lt.eps) then
      return
      ierr = 1
  endif
  
  ! Calculate standard deviation
  s = stdev(values,nvalues,ierr)
  
  ! Divide standard devation by mean
  coefvar = s/m
  
  return
  