function diff = tdistaux( t, vec )
% Auxiliary function used in TDISTINV.

% ^ Calls TDIST, BETAI, BETACF and GAMMLN  ^

v=vec(1);
alpha=vec(2);
diff = tdist( t, v ) - alpha;
return;