function besseljzero_test ( )

%*****************************************************************************80
%
%% besseljzero_test() tests besseljzero().
%
%  Discussion:
%
%    MATLAB provides the built in BESSELJ(NU,Z) function.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 January 2016
%
%  Author:
%
%    John Burkardt
%
%  Reference:
%
%    Ignace Bogaert,
%    Iteration-free computation of Gauss-Legendre quadrature nodes and weights,
%    SIAM Journal on Scientific Computing,
%    Volume 36, Number 3, 2014, pages A1008-1026.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'besseljzero_test():\n' );
  fprintf ( 1, '  besseljzero() returns the K-th zero of J0(X).\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '   K           X(K)                  J0(X(K))\n' );
  fprintf ( 1, '\n' );

  for k = 1 : 30
    x = besseljzero ( k );
    j0x = besselj ( 0, x );
    fprintf ( 1, '  %2d  %24.16g  %24.16g\n', k, x, j0x );
  end

  return
end
