home | exlaf77 | download | contact


  Demo applications
 
 

Here are small examples of using ExLAF77: solution of system of equations with Hilbert matrix and finding eigenvalues of Van der Monde matrix. These applications come with Windows exe files so you can download and run them without need to compile (see also important notes about these executables). The user interface is intentionally made primitive to keep the source uncluttered from code inessential for main purpose.

Hilbert matrix defined by formula Hi,j=1/(i+j-1) is well-known for its extremely high condition number sharply increasing with matrix order (see the table below). This makes inverting Hilbert matrix a challenge even at small n, if native-precision arithmetics is used.

Van der Monde matrices are also ill-conditioned starting from matrix orders well under 10. Here we use Van der Monde matrices of the form Vi,j = i j-1

 matrix order   condition number 
 of Hilbert matrix 
 condition number (spectral) 
 of Van der Monde matrix 
1 1.0 1.0
10 1.6e+13 2.1e+12
20 2.5e+28 1.8e+31
30 4.2e+43 3.2e+52
40 7.6e+58 1.7e+75
50 1.4e+74 1.2e+99
60 2.7e+89 6.5e+123
70 5.2e+104 1.9e+149
80 9.9e+119 2.3e+175
90 1.9e+135 9.6e+201
100 3.8e+150 1.2e+229


  Solving system of equations with Hilbert matrix
source code HILBERT_SOL.FOR
executable HILBERT_SOL.EXE (3.1 Mb)
to download, click on the link with right mouse button and select Save Target As... or Save Link As...
sample RHS file HILBERT_RHS.TXT

This application will ask to enter matrix order n and the number of 4-byte words for mantisa and exponent. It is enough to set 1 word for exponent. As a reference point, for the Hilbert matrix of n=100 you may wish to specify a mantissa of 30 words. If precision (mantissa) is insufficient for given matrix order, an error message is printed and application stops. You can easily modify it so that instead of exiting, it automatically increases precision and starts over.

The right-hand side vector is read from a plain text file that should be named "HILBERT_RHS.TXT". For your convenience we provide a sample RHS input file. The program reads only as many elements from it as the matrix order n you specify at program start. There is no need to delete unnecessary values from the input file.

The solution vector will be printed into file HILBERT_SOL.TXT.


  Finding eigenvalues of Van der Monde matrix
source code VANDERMONDE_EV.FOR
executable VANDERMONDE_EV.EXE (3.1 Mb)
to download, click on the link with right mouse button and select Save Target As... or Save Link As...

This application will ask to enter matrix order n and the number of 4-byte words for mantisa and exponent. It is enough to set 1 word for exponent. As a reference point, for the Van der Monde matrix of n=100 you may wish to specify a mantissa of 50 words. If precision (mantissa) is insufficient for given matrix order, an error message is printed and application stops. As in the previous example, it is easy to make it automatically start over with a higher precision.

The resulting eigen values are printed into text file "VANDERMONDE_EV.TXT".


  Notes about demo executables

Exe files provided on this page are intended only for Windows x86 platforms. They require no installation and do not depend on other files (except for data input as described above) nor on the directory where running.

We certify that demo examples do not access your registry nor any other files and information on your computer, except creating result file as described, and they do not send any information over the net. In other words they do not perform any operations except calculations described here.







  Questions and Answers

  ExLAF77 User's Manual

  Try now
 
© 2002 QNT Software Dev. Inc.