> |
MATH 372 -- Numerical Linear Algebra
Hilbert Matrix Example
February 12, 2007
The Hilbert matrix
is a classical example showing what can happen when linear
equations are solved using floating-point arithmetic.
The exact solution of the system hilbert(7) x = is:
> |
> |
Unlike MATLAB, Maple allows you to specify "custom" floating-point number
systems by means of the Digits system variable. This gives the number of
decimal digits in the normalized floating-point numbers. We will start
with 5-digit arithmetic, increase to 10-digit arithmetic.
> |
> |
"Moral" -- it is always possible to get better results by increasing the number of
digits used in the floating point computations (if you have that capability).
However, by experimenting some, you will see that the larger n is for these matrices,
the more digits you need for reliable computed solutions(!)
> |