function arcsin_cdf_test ( )

%*****************************************************************************80
%
%% arcsin_cdf_test() tests arcsin_cdf().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    15 April 2009
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ARCSIN_CDF_TEST():\n' );
  fprintf ( 1, '  ARCSIN_CDF() evaluates the Arcsin CDF;\n' );
  fprintf ( 1, '  ARCSIN_CDF_INV() inverts the Arcsin CDF.\n' );
  fprintf ( 1, '  ARCSIN_PDF() evaluates the Arcsin PDF;\n' );

  a = 1.0;

  fprintf ( 1, '\n' );
  fprintf ( 1, '  PDF parameter A = %14g\n', a );

  if ( ~arcsin_check ( a ) )
    fprintf ( 1, '\n' );
    fprintf ( 1, 'ARCSIN_CDF_TEST - Fatal error!\n' );
    fprintf ( 1, '  The parameters are not legal.\n' );
    return
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '       X            PDF           CDF            CDF_INV\n' );
  fprintf ( 1, '\n' );

  for i = 1 : 10

    x = arcsin_sample ( a );

    pdf = arcsin_pdf ( x, a );

    cdf = arcsin_cdf ( x, a );

    x2 = arcsin_cdf_inv ( cdf, a );

    fprintf ( 1, ' %14f  %14f  %14f  %14f\n', x, pdf, cdf, x2 );

  end

  return
end
