anchor.diff:        pos(1,min) = (1 - gamma) * pos(1,dim) + gamma * pos(1, min)
         pos(2,min) = (1 - gamma) * pos(2,dim) + gamma * pos(2, min)
   
  +end subroutine
  +
  +!! for Nelder Mead expansions for salesman
  +pure subroutine expand_sales(weights, min, dim, gamma)
  +      implicit none
  +      real*8, dimension(:,:), intent(inout) :: weights
  +      integer, intent(in)                   :: min, dim
  +      real*8, intent(in)                    :: gamma
  +      integer                               :: i
  +
  +      do i = 1, dim - 1
  +          weights(min,i) = (1 - gamma)*weights(dim,i) + gamma*weights(min, i)
  +      end do
   
   end subroutine
   
  
positive.code:       write(*,*) pos(2,:)
        write(*,*) min, max, dim
  
        call pop_list(list, dim, pos)
        do i = 1, dim
            write(*,*) list(i,:)
            write(*,*) pos(1, i), pos(2,i)
        end do
  
        call findval_sales(pos, list, value, dim)
  
        write(*,*) value
  
  
negative.code:       integer, parameter             :: dim = 8
        integer :: min, max, i, minsave, maxsave
        integer, dimension(dim, dim-1) :: list
        real*8, dimension(dim, dim-1)  :: weights
        real*8, dimension(2, dim)      :: pos
        real*8, dimension(dim - 1)     :: value
        real*8  :: alpha = 1, beta = 0.5, gamma = 1.5, dist, cutoff = 0.0001
  