function stochastic_integral_ito_test ( )

%*****************************************************************************80
%
%% stochastic_integral_ito_test() tests stochastic_integral_ito().
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    20 March 2012
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'stochastic_integral_ito_test():\n' );
  fprintf ( 1, '  Estimate the Ito integral of W(t) dW over [0,1].\n' );
  fprintf ( 1, '\n' );
  fprintf ( 1, '                                             Abs      Rel\n' );
  fprintf ( 1, '         N        Exact        Estimate      Error    Error\n' );
  fprintf ( 1, '\n' );

  n = 100;

  for i = 1 : 7

    [ estimate, exact, error ] = stochastic_integral_ito ( n );

    fprintf ( 1, '  %8d  %12.8g  %12.8g  %8.2g  %8.2g\n', n, exact, estimate, ...
      error, error / exact );

    n = n * 4;

  end

  return
end
