function digits_decimal_to_r8_test ( )

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

  for test = 1 : 3

    if ( test == 1 )
      d = [ 1, 2, 0, 3, 4 ];
      p = -2;
    elseif ( test == 2 )
      d = [ 9, 8, 7, 6, 5, 4, 3 ];
      p = 3;
    elseif ( test == 3 )
      d = [ 3, 1, 4, 1, 5, 9, 2, 6, 5 ];
      p = 0;
    end

    r8 = digits_decimal_to_r8 ( d, p );

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

  end

  return
end
