function test03 ( )

%*****************************************************************************80
%
%% test03() tests vandevel() and vandevel2().
%
%  Licensing:
%
%    This code is distributed under the MIT license. 
%
%  Modified:
%
%    13 June 2024
%
%  Author:
%
%    John Burkardt
%
  fprintf ( 1, '\n' );
  fprintf ( 1, 'test03():\n' );
  fprintf ( 1, '  Compare vandev() and vandev2() on\n' );
  fprintf ( 1, '  e^x (x^2-1)^m\n' );

  for mval = 1 : 2

    if ( mval == 1 )
      m = 5;
    else
      m = 9;
    end

    for solver = 1 : 2
%
%  The starting point.
%
      x = 1.5;
%
%  The error tolerance on f(x).
%
      abserr = 1.0e-16;
%
%  The maximum number of iterations.
%
      kmax = 20;
%
%  The function.
%
      if ( mval == 1 )
        f = @func03;
      else
        f = @func04;
      end

      if ( solver == 1 )
        [ x, em, ierror, k ] = vandevel ( x, abserr, kmax, f )
      else
        [ x, em, ierror, k ] = vandevel_improved ( x, abserr, kmax, f )
      end

    end

  end

  return
end
