function jacobi_poly_test ( )

%*****************************************************************************80
%
%% jacobi_poly_test() tests jacobi_poly().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 October 2008
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'jacobi_poly_test():\n' );
  fprintf ( 1, '  jacobi_poly() computes values of \n' );
  fprintf ( 1, '  the Jacobi polynomial.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '       N       A       B      X       JPV      JACOBI\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, n, a, b, x, fx ] = jacobi_poly_values ( n_data );

    if ( n_data == 0 )
      break
    end

    c = jacobi_poly ( n, a, b, x );
    fx2 = c(n+1);

    fprintf ( 1, '  %6d  %8f  %8f  %8f  %12f  %12f\n', n, a, b, x, fx, fx2 );

  end

  return
end
