function i4mat_is_integer_test ( )

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

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

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

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

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

  return
end
