anchor.diff:  150     shs = zero
           dhs = zero
           dhd = zero
  -        do 160 i = 1, n
  +        do i = 1, n
               if (xbdi(i) == zero) then
                   shs = shs + s (i) * hs (i)
                   dhs = dhs + d (i) * hs (i)
                   dhd = dhd + d (i) * hred (i)
               end if
  -160     continue
  +        end do
   !
   !     Seek the greatest reduction in Q for a range of equally spaced values
   !     of ANGT in [0,ANGBD], where ANGT is the tangent of half the angle of
  
positive.code: !
  !     Update the BMAT and ZMAT matrices so that the status of the KNEW-th
  !     interpolation point can be changed from provisional to original. The
  !     branch to label 350 occurs if all the original points are reinstated.
  !     The nonnegative values of W(NDIM+K) are required in the search below.
  !
              call update (n, npt, bmat, zmat, ndim, vlag, beta, denom, knew, w)
              if (nrem == 0) go to 350
              do 110 k = 1, npt
  110         w (ndim+k) = abs (w(ndim+k))
          end if
  !
  !     Pick the index KNEW of an original interpolation point that has not
  
negative.code:         temp = gredsq * dredsq - dredg * dredg
          if (temp <= 1.0e-4_wp*qred*qred) go to 190
          temp = sqrt (temp)
          do i = 1, n
              if (xbdi(i) == zero) then
                  s (i) = (dredg*d(i)-dredsq*gnew(i)) / temp
              else
                  s (i) = zero
              end if
          end do
          sredg = - temp
  !
  !     By considering the simple bounds on the variables, calculate an upper
  