function rat_normalize_test ( )

%*****************************************************************************80
%
%% rat_normalize_test() tests rat_normalize().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    01 June 2015
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'rat_normalize_test():\n' );
  fprintf ( 1, '  rat_normalize() normalizes a rational.\n' );

  rat_num = 7;
  rat_top = [ 3, 1,    20,  8, -10,   9, -11 ];
  rat_bot = [ 4, 1000,  1,  4,   7, -15, -11 ];

  fprintf ( 1, '\n' );
  fprintf ( 1, '           A           B             A             B\n' );
  fprintf ( 1, '                                 normalized     normalized\n' );
  fprintf ( 1, '\n' );

  for i = 1 : rat_num
    a1 = rat_top(i);
    b1 = rat_bot(i);
    [ a2, b2 ] = rat_normalize ( a1, b1 );
    fprintf ( 1, '  %10d  %10d    %10d  %10d\n', a1, b1, a2, b2 );
  end

  return
end
