anchor.diff:  end do
   do i = 1, N-1
       ! find ith smallest in 'a'
  -    relimin = minloc(a2(i:))
  -    imin = relimin(1) + i - 1
  +    imin = minloc(a2(i:),1) + i - 1
  +
       ! swap to position i in 'a' and 'b', if not already there
       if (imin /= i) then
           temp = a2(i); a2(i) = a2(imin); a2(imin) = temp
  
positive.code: end do
  do i = 1, N-1
      ! find ith smallest in 'a'
      relimin = minloc(a2(i:))
      imin = relimin(1) + i - 1
      ! swap to position i in 'a' and 'b', if not already there
      if (imin /= i) then
          temp2 = a2(i); a2(i) = a2(imin); a2(imin) = temp2
  
negative.code: ! iargsort([10, 9, 8, 7, 6])   ! Returns [5, 4, 3, 2, 1]
  
  integer :: N                           ! number of numbers/vectors
  integer :: i,imin                      ! indices: i, i of smallest
  integer :: temp                        ! temporary
  integer :: a2(size(a))
  a2 = a
  