function r8_upak_test ( )

%*****************************************************************************80
%
%% R8_UPAK_TEST tests R8_UPAK.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 April 2016
%
%  Author:
%
%    John Burkardt
%
  x_test = [ ...
    64.0, ...
   128.0, ...
   -64.0, ...
    96.0, ...
    15.0, ...
    0.5, ...
    0.25, ...
    0.625, ...
   64.625, ...
    3.141592653589793, ...
    0.0 ];

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

  for i = 1 : 11

    x = x_test(i);

    [ y, n ] = r8_upak ( x );

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

  end

  return
end
