function value = p02_fun ( x )

%*****************************************************************************80
%
%% p02_fun() evaluates the function for problem 2.
%
%  Discussion:
%
%    This example is due to Bernstein.  If equally spaced
%    abscissas are used, the sequence of interpolating polynomials Pn(X)
%    only converges to F(X) at -1, 0, and 1.
%
%  Dimension:
%
%    N = 1
%
%  Interval:
%
%    -1 <= X <= 1
%
%  Function:
%
%    ABS ( X )
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    24 August 2011
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real X, the point at which the function
%    is to be evaluated.
%
%  Output:
%
%    real VALUE, the value of the function at X.
%
  value = abs ( x );

  return
end
