function r8_inits_test ( )

%*****************************************************************************80
%
%% R8_INITS_TEST tests R8_INITS.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    22 April 2016
%
%  Author:
%
%    John Burkardt
%
  sincs = [ ...
    -0.374991154955873175839919279977323464E+00, ...
    -0.181603155237250201863830316158004754E+00, ...
    +0.005804709274598633559427341722857921E+00, ...
    -0.000086954311779340757113212316353178E+00, ...
    +0.000000754370148088851481006839927030E+00, ...
    -0.000000004267129665055961107126829906E+00, ...
    +0.000000000016980422945488168181824792E+00, ...
    -0.000000000000050120578889961870929524E+00, ...
    +0.000000000000000114101026680010675628E+00, ...
    -0.000000000000000000206437504424783134E+00, ...
    +0.000000000000000000000303969595918706E+00, ...
    -0.000000000000000000000000371357734157E+00, ...
    +0.000000000000000000000000000382486123E+00, ...
    -0.000000000000000000000000000000336623E+00, ...
    +0.000000000000000000000000000000000256E+00 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8_INITS_TEST:\n' );
  fprintf ( 1, '  R8_INITS determines the Chebyshev interpolant degree\n' );
  fprintf ( 1, '  necessary to guarantee a desired accuracy level.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Here, we use a 15 term Chebyshev expansion for the\n' );
  fprintf ( 1, '  sine function.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Accuracy    Terms Needed\n' );
  fprintf ( 1, '\n' );

  tol = 1.0;
  for i = 1 : 18
    n = r8_inits ( sincs, 15, tol );
    fprintf ( 1, '  %14.6g  %4d\n', tol, n );
    tol = tol / 10.0;
  end

  return
end