function jacobi_sn_test ( )

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

  n_data = 0;

  while ( true )

    [ n_data, u, a, k, m, sn1 ] = jacobi_sn_values ( n_data );

    if ( n_data == 0 )
      break;
    end

    sn2 = jacobi_sn ( u, m );

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

  end

  return
end

