function r8vec_is_integer_test ( )

%*****************************************************************************80
%
%% R8VEC_IS_INTEGER_TEST tests R8VEC_IS_INTEGER.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    19 August 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8VEC_IS_INTEGER_TEST\n' );
  fprintf ( 1, '  R8VEC_IS_INTEGER is TRUE if every entry of an R8VEC\n' );
  fprintf ( 1, '  is an integer.\n' );

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Example 1: Obviously integer:\n' );
  fprintf ( 1, '\n' );
  n = 6;
  a = [ 1, 2, 3, 4, 5, 6 ];
  a
  if ( r8vec_is_integer ( n, a ) )
    fprintf ( 1, '  A is an integer vector.\n' );
  else
    fprintf ( 1, '  A is NOT an integer vector.\n' );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Example 2: Obviously NOT integer:\n' );
  fprintf ( 1, '\n' );
  n = 6;
  a = [ 1, 2, 3, 4, 5, 6.5 ];
  a
  if ( r8vec_is_integer ( n, a ) )
    fprintf ( 1, '  A is an integer vector.\n' );
  else
    fprintf ( 1, '  A is NOT an integer vector.\n' );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Example 3: Not Integer, Not obvious:\n' );
  fprintf ( 1, '\n' );
  n = 6;
  a = [ 1, 2, 3, 4, 5, 6 ];
  a(5) = a(5) + sqrt ( eps );
  a
  if ( r8vec_is_integer ( n, a ) )
    fprintf ( 1, '  A is an integer vector.\n' );
  else
    fprintf ( 1, '  A is NOT an integer vector.\n' );
  end

  fprintf ( 1, '\n' );
  fprintf ( 1, '  Example 4: Not Integer, Not obvious:\n' );
  fprintf ( 1, '\n' );
  n = 6;
  a = [ 1, 2, 300000000.2, 4, 5, 6 ];
  a
  if ( r8vec_is_integer ( n, a ) )
    fprintf ( 1, '  A is an integer vector.\n' );
  else
    fprintf ( 1, '  A is NOT an integer vector.\n' );
  end

  return
end
