function jacobi_dn_test ( )

%*****************************************************************************80
%
%% jacobi_dn_test() tests jacobi_dn().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 July 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'jacobi_dn_test():\n' );
  fprintf ( 1, '  jacobi_dn() evaluates the Jacobi elliptic function DN.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '    U       M       Exact DN                DN(U,M)\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, u, a, k, m, dn1 ] = jacobi_dn_values ( n_data );

    if ( n_data == 0 )
      break;
    end

    dn2 = jacobi_dn ( u, m );

    fprintf ( 1, '%8.4f%8.4f%24.16g%24.16g\n', u, m, dn1, dn2 );

  end

  return
end
