function value = r8_cot ( ang )

%*****************************************************************************80
%
%% R8_COT returns the cotangent of an angle.
%
%  Definition:
%
%    R8_COT ( THETA ) = COS ( THETA ) / SIN ( THETA )
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 July 2004
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real ANG, the angle, in radians.
%
%  Output:
%
%    real VALUE, the cotangent of the angle.
%
  if ( sqrt ( eps ) <= abs ( sin ( ang ) ) )
    value  = cos ( ang ) / sin ( ang );
  else
    value = r8_sign ( cos ( ang ) ) * Inf;
  end

  return
end
