function r8cf_evaluate_test ( )

%*****************************************************************************80
%
%% r8cf_evaluate_test() tests r8cf_evaluate().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    06 August 2017
%
%  Author:
%
%    John Burkardt
%
  n = 20;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'r8cf_evaluate_test():\n' );
  fprintf ( 1, '  Test r8cf_evaluate():\n' );

  a = zeros ( 1, n + 1 );

  a(1) = 3.0;
  a(2:n+1) = 6.0;

  b = zeros ( 1, n + 1 );
  b(1) = 0.0;
  for i = 2 : n
    b(i) = ( 2 * i - 3 ) ^ 2;
  end

  [ p, q ] = r8cf_evaluate ( n, a, b );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  CF numerators, denominators, ratios:\n' );
  fprintf ( 1, '\n' );

  for i = 0 : n
    fprintf ( 1, '  %2d  %20d  %20d  %24.16g\n', ...
      i, p(i+1), q(i+1), p(i+1) / q(i+1) );
  end

  return
end
