function err = calcFError(n)
%   Calculates the exact forward error of the solution of
%   Ax = b, where A is the nxn-Hilbert-Matrix and b has all
%   entries equal to one, if solved by LR-Decomposition.
%   
%   K. Grella, 2013-02-28author unknown
%   edited: M. Nägele, Oct. 2013

digits(100);
A = hilb(n); b = ones(n,1);
x = lrsolve(A, b);
xe = vpa(A) \ vpa(b);
err = norm(double(x-xe))/norm(x);
end
