function [search_index] = iter_binary_search(search_array, search_value, start_index, end_index)

	while (end_index > start_index)
	  mid_index = floor((start_index + end_index)/2);
	  if (search_array(mid_index) >= search_value)
	    end_index = mid_index; 
	  else
	    start_index = mid_index+1; 
	  end
	end

	if (search_array(start_index) == search_value)
	  search_index = start_index;
	else
	  search_index = -1;
	end
