function error_frobenius = r8mat_is_ldlt ( a, l, d )

%*****************************************************************************80
%
%% r8mat_is_ldlt measures the error in an LDLT factorization.
%
%  Discussion:
%
%    An R8MAT is a matrix of real values.
%
%    This routine simply returns the Frobenius norm of the M x M matrix:
%      A - L * D * L' 
%
%  Licensing:
%
%    This code is distributed under the MIT license.
%
%  Modified:
%
%    05 December 2019
%
%  Author:
%
%    John Burkardt
%
%  Input:
%
%    real A(M,M), the matrix.
%
%    real L(M,M), D(M,M), the LDLT factors.
%
%  Output:
%
%    real ERROR_FROBENIUS, the Frobenius norm of A - L*D*L'.
%
  f = a - l * d * l';

  error_frobenius = norm ( f, 'fro' );

  return
end
