function jacobi_dnm_test ( )

%*****************************************************************************80
%
%% jacobi_dnm_test() tests jacobi_dnm().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 November 2020
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'jacobi_dnm_test():\n' );
  fprintf ( 1, '  jacobi_dnm evaluates the Jacobi elliptic function DN(U,M).\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '    U       M       Exact DN                DN(U,M)     |Diff|\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_dnm ( u, m );

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

  end

  return
end
