function z = cosint(x)
%COSINT Cosine integral function.
%  COSINT(x) = Gamma + log(x) + int((cos(t)-1)/t,t,0,x)
%  where Gamma is Euler's constant, .57721566490153286060651209...
%  Euler's constant can be evaluated with vpa('eulergamma').
%
%  See also SININT.

%   Copyright (c) 1993-1999 The Mathworks, Inc. All Rights Reserved.
%  $Revision: 1.8 $  $Date: 1999/01/04 21:55:17 $ 

if findstr(num2str(x),'Inf')
   z = 0;
else
   z = double(cosint(sym(x)));
end
