function value = sincn_deriv2 ( x )

%*****************************************************************************80
%
%% sincn_deriv2(): second derivative of the normalized sinc() function.
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    26 March 2025
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real x: the argument of the function.
%
%  Output:
%
%    real value, the value of the second derivative.
%
  value = zeros ( size ( x ) );

  epsilon = 1.0e-10;
  nz = find ( epsilon < abs ( x ) );
  zr = find ( abs ( x ) <= epsilon );

  value(nz) = ...
    ( ( 2.0 - pi^2 * x(nz).^2 ) .* sin ( pi * x(nz) ) ...
    - 2.0 * pi * x(nz) .* cos ( pi * x(nz) ) ) ./ ( pi * x(nz).^3 );
  value(zr) = - pi^2 / 3.0;

  return
end

