function errors_test ( )

%*****************************************************************************80
%
%% ERRORS_TEST tests ERRORS.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    10 January 2019
%
%  Author:
%
%    John Burkardt
%
  addpath ( '../errors' )

  timestamp ( );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ERRORS_TEST:\n' );
  fprintf ( 1, '  MATLAB version\n' );
  fprintf ( 1, '  Test ERRORS.\n' );

  errors_header ( );

  errors_test01 ( );
  errors_test02 ( );
  errors_test03 ( );
  errors_test04 ( );
  errors_test05 ( );
  errors_test06 ( );
  errors_test065 ( );
  errors_test07 ( );
  errors_test08 ( );
  errors_test09 ( );
  errors_test10 ( );

  errors_test11 ( );
  errors_test12 ( );
  errors_test13 ( );
  errors_test14 ( );
  errors_test15 ( );
  errors_test16 ( );
  errors_test17 ( );
  errors_test18 ( );
  errors_test19 ( );
  errors_test20 ( );

  errors_test21 ( );
  errors_test22 ( );
  errors_test23 ( );
  errors_test24 ( );
  errors_test26 ( );
  errors_test27 ( );
%
%  Terminate.
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'ERRORS_TEST:\n' );
  fprintf ( 1, '  Normal end of execution.\n' );
  fprintf ( 1, '\n' );
  timestamp ( );

  rmpath ( '../errors' )

  return
end
function errors_header ( )

%*****************************************************************************80
%
%% ERRORS_HEADER prints out a header.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    21 August 2017
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'HOW RELIABLE ARE OUR CALCULATIONS?\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'This program demonstrates how unreliable certain\n' );
  fprintf ( 1, 'calculations are, when performed with a finite\n' );
  fprintf ( 1, 'accuracy on a computer.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'Standard software is used where possible for the\n' );
  fprintf ( 1, 'solution of these problems.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, 'Paraphrasing the reference:\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, ' "Despite the spread of computers and calculators,\n' );
  fprintf ( 1, '  many users suffer a certain computational\n' );
  fprintf ( 1, '  gullibility.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Whatever the computer produces is regarded as\n' );
  fprintf ( 1, '  almost mathematically proven.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  It is often quite astonishing to discover that\n' );
  fprintf ( 1, '  even in simple calculations with just a few\n' );
  fprintf ( 1, '  operations it is possible to produce completely\n' );
  fprintf ( 1, '  incorrect results, and that this is a necessary\n' );
  fprintf ( 1, '  consequence of current computer techniques - not\n' );
  fprintf ( 1, '  just the user''s method, but the arithmetic\n' );
  fprintf ( 1, '  processes of the computer as well.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  The following examples show how few operations\n' );
  fprintf ( 1, '  are needed for a computer to return meaningless\n' );
  fprintf ( 1, '  results.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  This fact applies not just to hand calculators\n' );
  fprintf ( 1, '  but also to the biggest supercomputers.  The\n' );
  fprintf ( 1, '  worst aspect of these effects is that one never\n' );
  fprintf ( 1, '  knows whether, when or where these sorts of\n' );
  fprintf ( 1, '  errors will enter into a long, involved\n' );
  fprintf ( 1, '  calculation and destroy the results.\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '  Only in the last few years have methods and \n' );
  fprintf ( 1, '  solution processes been developed to \n' );
  fprintf ( 1, '  mathematically describe these effects, and \n' );
  fprintf ( 1, '  numerically control them."\n' );

  return
end