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

	if (start_index == end_index)  
	  if (search_array(start_index) == search_value)
	    search_index = start_index;
	  else
	    search_index = -1;
	  end
	else
	  mid_index = floor((start_index + end_index)/2);
	  if (search_array(mid_index) >= search_value)
	    search_index = rec_binary_search(search_array, search_value, start_index, mid_index);
	  else
	    search_index = rec_binary_search(search_array, search_value, mid_index+1, end_index);
	  end
	end
