anchor.diff:                  
           grad = (aa - 1d0)/(1d0 - t1) * t1 * z(i) **(cc -1d0)
        & * cc / sigma
  -        grad = grad + -  z(i) **(cc -1d0) * cc/sigma -
  +        grad = grad + (-  z(i) **(cc -1d0) * cc/sigma) -
        & (cc -1d0)/(z(i) *sigma)
           grad = -grad
           if (nloc .NE. 1) then 
  
positive.code: C the output.  INDX(N) records the pivoting order.
  
  
        DOUBLE PRECISION A(N,N),C(N),C1
        INTEGER N
        INTEGER INDX(N)
  
  
negative.code:      & t1 * z(i) **(cc - 1d0) *cc 
          grad = grad + z(i) **(cc - 1d0) *cc  
       & + (cc - 1d0)/z(i)
          grad = grad * (-z(i)/sigma)
          
          if (not_scalar_a) then 
          	gradlike(i) = grad
  