function result = jdn ( x, k )

%*****************************************************************************80
%
%% jdn() computes the Jacobi elliptic funcion dn(x,k).
%
%  Discussion:
%
%    Compute the Jacobi elliptic function dn(x,k) for
%    argument |x|<inf and elliptic modulus |k|<inf. Returns NaN if any of
%    the arguments is invalid or convergence failed. It is assumed that 
%    arguments are real scalars without check.
%
  [ ~, ~, result ] = sncndn ( x, (1 - k)*(1 + k) );

  return
end

