function value = sag ( x )

%*****************************************************************************80
%
%% sag is a test function with a minimizer near x=7.
%
%  Licensing:
%
%    This code is distributed under the GNU LGPL license.
%
%  Modified:
%
%    24 September 2019
%
%  Input:
%
%    real x: the argument.
%
%  Output:
%
%    real value: the function value.
%
  value = x.^2 .* cos ( ( x + 3.0 * pi ) / 4.0 );

  return
end
