anchor.diff:          if (ibrnch == 1 .or. iflag == 1) go to 370
           jdrop = 0
           temp = pareta
  -        do 270 j = 1, n
  +        do j = 1, n
               if (veta(j) > temp) then
                   jdrop = j
                   temp = veta (j)
               end if
  -270     continue
  +        end do
           if (jdrop == 0) then
  -            do 280 j = 1, n
  +            do j = 1, n
                   if (vsig(j) < temp) then
                       jdrop = j
                       temp = vsig (j)
                   end if
  -280         continue
  +            end do
           end if
   !
   !     Calculate the step to the new vertex and its sign.
   !
           temp = gamma * rho * vsig (jdrop)
  -        do 290 i = 1, n
  -290     dx (i) = temp * simi (jdrop, i)
  +        do i = 1, n
  +            dx (i) = temp * simi (jdrop, i)
  +        end do
           cvmaxp = 0.0_wp
           cvmaxm = 0.0_wp
  -        do 310 k = 1, mp
  +        do k = 1, mp
               sum = 0.0_wp
  -            do 300 i = 1, n
  -300         sum = sum + a (i, k) * dx (i)
  +            do i = 1, n
  +                sum = sum + a (i, k) * dx (i)
  +            end do
               if (k < mp) then
                   temp = datmat (k, np)
                   cvmaxp = max (cvmaxp,-sum-temp)
                   cvmaxm = max (cvmaxm, sum-temp)
               end if
  -310     continue
  +        end do
           dxsign = 1.0_wp
           if (parmu*(cvmaxp-cvmaxm) > sum+sum) dxsign = - 1.0_wp
   !
   !     Update the elements of SIM and SIMI, and set the next X.
   !
           temp = 0.0_wp
  -        do 320 i = 1, n
  +        do i = 1, n
               dx (i) = dxsign * dx (i)
               sim (i, jdrop) = dx (i)
  -320     temp = temp + simi (jdrop, i) * dx (i)
  -        do 330 i = 1, n
  -330     simi (jdrop, i) = simi (jdrop, i) / temp
  -        do 360 j = 1, n
  +            temp = temp + simi (jdrop, i) * dx (i)
  +        end do
  +        do i = 1, n
  +            simi (jdrop, i) = simi (jdrop, i) / temp
  +        end do
  +        do j = 1, n
               if (j /= jdrop) then
                   temp = 0.0_wp
  -                do 340 i = 1, n
  -340             temp = temp + simi (j, i) * dx (i)
  -                do 350 i = 1, n
  -350             simi (j, i) = simi (j, i) - temp * simi (jdrop, i)
  -            end if
  -360     x (j) = sim (j, np) + dx (j)
  +                do i = 1, n
  +                    temp = temp + simi (j, i) * dx (i)
  +                end do
  +                do i = 1, n
  +                    simi (j, i) = simi (j, i) - temp * simi (jdrop, i)
  +                end do
  +            end if
  +            x (j) = sim (j, np) + dx (j)
  +        end do
           go to 40
   !
   !     Calculate DX=x(*)-x(0). Branch if the length of DX is less than 0.5*RHO.
  
positive.code:         'and PARMU is set to zero.')
          nfvals = 0
          temp = 1.0_wp / rho
          do 30 i = 1, n
              sim (i, np) = x (i)
              do 20 j = 1, n
                  sim (i, j) = 0.0_wp
  20          simi (i, j) = 0.0_wp
              sim (i, i) = rho
  30      simi (i, i) = temp
          jdrop = np
          ibrnch = 0
  !
  
negative.code:             if (rho <= 1.5_wp*rhoend) rho = rhoend
              if (parmu > 0.0_wp) then
                  denom = 0.0_wp
                  do k = 1, mp
                      cmin = datmat (k, np)
                      cmax = cmin
                      do i = 1, n
                          cmin = min (cmin, datmat(k, i))
                          cmax = max (cmax, datmat(k, i))
                      end do
                      if (k <= m .and. cmin < 0.5_wp*cmax) then
                          temp = max (cmax, 0.0_wp) - cmin
                          if (denom <= 0.0_wp) then
  