function r8_pak_test ( )

%*****************************************************************************80
%
%% R8_PAK_TEST tests R8_PAK.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    24 April 2016
%
%  Author:
%
%    John Burkardt
%
  n_test = [ 7, 8, 7, 7, 4, 0, -1, 0, 7, 2, 0 ];

  y_test = [ ...
    0.5, ...
    0.5, ...
   -0.5, ...
    0.75, ...
    0.9375, ...
    0.5, ...
    0.5, ...
    0.625, ...
    0.5048828125, ...
    0.7853981633974483, ...
    0.0 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8_PAK_TEST:\n' );
  fprintf ( 1, '  R8_PAK converts a mantissa and base 2 exponent to an R8.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '    Mantissa     Exponent         R8\n' );
  fprintf ( 1, '\n' );

  for i = 1 : 11

    y = y_test(i);
    n = n_test(i);

    x = r8_pak ( y, n );

    fprintf ( 1, '  %24.16g  %8d  %14.16g\n', y, n, x );

  end

  return
end