function z = cosint(x)
%COSINT Cosine integral function.
%	COSINT(x) = gamma+ln(i*x)-i*pi/2+int((cos(t)-1)/t, t=0..x)
%
%	See also SININT.

%	Copyright (c) 1993-95 by The MathWorks, Inc.
%	$Revision: 1.7 $  $Date: 1995/03/01 21:38:45 $

% cosint(0) is -infinity.
p = find(x==0);
x(p) = ones(size(p));
z = mfun('Ci',x);
z(p) = -Inf*ones(size(p));
