function jacobi_sn_test ( )

%*******************************************************************************
%
%% JACOBI_SN_TEST tests JACOBI_SN.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    25 June 2018
%
%  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, 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