function bsnew(low, high, tol, verbose)
% bsnew Initializes binary search [PHYS210-bs]
%
%  bsnew(low, high, [tol], [verbose])
%     Input argument tol is optional and defaults to 1.0e-15.
%     Input argument verbose is optional, if 0 suppresses all printed output.

%  Bs_progress stores progression of search for undo operation
%     Bs_progress(i) = 0   -  ith iterate was low;
%     Bs_progress(i) = 1   -  ith iterate was high;
   global Bs_low Bs_high Bs_tol Bs_progress;

   if nargin < 2 | nargin > 4
      warning('usage: bsnew(low, high, [tol])');
      return;
   end
   if nargin < 3 
      tol = nan;
   end
   if nargin < 4
      verbose = 1;
   end
   bsreset(verbose);
   bssettol(tol);
   Bs_low(1) = low;
   Bs_high(1) = high;
   Bs_progress = [];
   format long;
   if verbose
      bsbracket;
      fprintf('\n%.16e\n', bscurrent);
   end
end
