function digits_sexagesimal_to_r8_test ( )

%*****************************************************************************80
%
%% digits_sexagesimal_to_r8_test() tests digits_sexagesimal_to_r8().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    21 June 2022
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'digits_sexagesimal_to_r8_test():\n' );
  fprintf ( 1, '  digits_sexagesimal_to_r8() converts base 60 digits of a\n' );
  fprintf ( 1, '  number into a real value;\n' );

  for test = 1 : 3

    if ( test == 1 )
      d = [ 4, 37, 46, 40 ];
      p = 3;
    elseif ( test == 2 )
      d = [ 3, 8, 29, 44, 0, 47, 25 ];
      p = 0;
    elseif ( test == 3 )
      d = [ 1, 24, 51, 10, 7, 46, 6, 4 ];
      p = 0;
    end

    r8 = digits_sexagesimal_to_r8 ( d, p );

    fprintf ( 1, '\n' );
    fprintf ( 1, '  Given sexagesimal digits:\n' );
    disp ( d )
    fprintf ( 1, '  and sexagesimal "decimal place" p = %d\n', p );
    fprintf ( 1, '  corresponding value is r8 = %g\n', r8 );

  end

  return
end
