function value = c8_arg ( x )

%*****************************************************************************80
%
%% c8_arg() returns the argument of a C8.
%
%  Discussion:
%
%    A C8 is a complex real value.
%
%    The value returned by this function will always lie between 0 and 2*PI.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    12 January 2021
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    complex X, the value whose argument is desired.
%
%  Output:
%
%    real VALUE, the argument of X.
%
  if ( imag ( x ) == 0.0 && real ( x ) == 0.0  )

    value = 0.0;

  else

    value = atan2 ( imag ( x ), real ( x ) );

  end

  return
end

