function trigamma_test ( )

%*****************************************************************************80
%
%% trigamma_test() tests trigamma().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    03 April 2016
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'trigamma_test():\n' );
  fprintf ( 1, '  trigamma() evaluates the TriGamma function.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '      X               FX               FX\n' );
  fprintf ( 1, '                      Tabulated        Computed\n' );
  fprintf ( 1, '\n' );

  n_data = 0;

  while ( true )

    [ n_data, x, fx1 ] = trigamma_values ( n_data );

    if ( n_data == 0 )
      break
    end

    fx2 = trigamma ( x );

    fprintf ( 1, '  %12g  %24.16g  %24.16g\n', x, fx1, fx2 );

  end

  return
end
