function r8_is_nan_test ( )

%*****************************************************************************80
%
%% R8_IS_NAN_TEST tests R8_IS_NAN.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    31 July 2018
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'R8_IS_NAN_TEST\n' );
  fprintf ( 1, '  R8_IS_NAN reports whether an R8 is Not-a-Number.\n' );
  fprintf ( 1, '\n' );

  r8 = 1.0;
  fprintf ( 1, '  R8_IS_NAN(1.0) = %d\n', r8_is_nan ( r8 ) );

  r1 = 1.0;
  r2 = 0.0;
  r8 = r1 / r2;
  fprintf ( 1, '  R8_IS_NAN(1.0/0.0) = %d\n', r8_is_nan ( r8 ) );

  r1 = 0.0;
  r2 = 0.0;
  r8 = r1 / r2;
  fprintf ( 1, '  R8_IS_NAN(0.0/0.0) = %d\n', r8_is_nan ( r8 ) );

  r1 = 0.0;
  r2 = 0.0;
  r8 = r1 ^ r2;
  fprintf ( 1, '  R8_IS_NAN(0^0) = %d\n', r8_is_nan ( r8 ) );

  r1 = -2.0;
  r8 = acos ( r1 );
  fprintf ( 1, '  R8_IS_NAN(acos(-2)) = %d\n', r8_is_nan ( r8 ) );

  r1 = 1000.0;
  r8 = exp ( r1 );
  fprintf ( 1, '  R8_IS_NAN(exp(1000)) = %d\n', r8_is_nan ( r8 ) );

  r1 = 0.0;
  r8 = log ( r1 );
  fprintf ( 1, '  R8_IS_NAN(log(0)) = %d\n', r8_is_nan ( r8 ) );

  r1 = -1.0;
  r8 = sqrt ( r1 );
  fprintf ( 1, '  R8_IS_NAN(sqrt(-1)) = %d\n', r8_is_nan ( r8 ) );

  return
end
