function r8vec_sort_bubble_d_test ( )

%*****************************************************************************80
%
%% r8vec_sort_bubble_d_test() tests r8vec_sort_bubble_d().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    23 July 2018
%
%  Author:
%
%    John Burkardt
%
  n = 20;

  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8VEC_SORT_BUBBLE_D_TEST\n' );
  fprintf ( 1, '  R8VEC_SORT_BUBBLE_D descending sorts an R8VEC.\n' );
  fprintf ( 1, '\n' );

  b = 0.0;
  c = 3.0 * n;
  a = b + ( c - b ) * rand ( n, 1 );

  r8vec_print_part ( n, a, 1, 10, '  Original array:' );

  a = r8vec_sort_bubble_d ( n, a );

  r8vec_print_part ( n, a, 1, 10, '  Descending sorted array:' );

  return
end
