function diff = fdistaux( f, vec )
% Auxiliary function used in FDISTINV.

% Peter R. Shaw, Woods Hole Oceanographic Institution
% Woods Hole, MA 02543
% (508) 457-2000 ext. 2473  pshaw@aqua.whoi.edu
% March, 1990

% ^ Calls FDIST, BETAI, BETACF and GAMMLN  ^

v1=vec(1);
v2=vec(2);
alpha=vec(3);
if f < 1, f = 1; end;
diff = fdist( f, v1, v2 ) - alpha;
return;