LAPACK_EXAMPLES_TEST FORTRAN90 version Test the LAPACK library. DGBTRF_TEST DGBTRF factors a general band matrix. DGBTRS solves a factored system. For a double precision real matrix (D) in general band storage mode (GB): Bandwidth is 3 Partial solution (all should be 1) 1 1.0000000 2 1.0000000 3 1.0000000 4 1.0000000 5 1.0000000 DGECON_TEST DGECON computes the condition number of a factored matrix DGETRF computes the LU factorization; For a double precision real matrix (D) in general storage mode (GE): The matrix A: Col 1 2 3 Row 1 1. 2. 3. 2 4. 5. 6. 3 7. 8. 0. Matrix reciprocal condition number = 0.240000E-01 DGEQRF_TEST DGEQRF computes the QR factorization: A = Q * R DORGQR computes the explicit form of the Q factor. For a double precision real matrix (D) in general storage mode (GE): In this case, our M x N matrix A has more rows than columns: M = 8 N = 6 The matrix A: Col 1 2 3 4 5 Row 1 0.218418 0.438290E-01 0.897504 0.260303 0.861216 2 0.956318 0.633966 0.350752 0.912484 0.453794 3 0.829509 0.617272E-01 0.945448E-01 0.113664 0.911977 4 0.561695 0.449539 0.136169E-01 0.351629 0.597917 5 0.415307 0.401306 0.859097 0.822887 0.188955 6 0.661187E-01 0.754673 0.840847 0.267132 0.761492 7 0.257578 0.797287 0.123104 0.692066 0.396988 8 0.109957 0.183837E-02 0.751236E-02 0.561662 0.185314 Col 6 Row 1 0.574366 2 0.367027 3 0.617205 4 0.361529 5 0.212930 6 0.714471 7 0.117707 8 0.299329 The Q factor: Col 1 2 3 4 5 Row 1 -0.146556 0.816117E-01 0.701174 -0.252365E-01 0.399449 2 -0.641676 -0.521467E-01 -0.116738 0.157662 -0.378612 3 -0.556589 0.406950 -0.288622E-01 -0.372796 0.266842 4 -0.376890 -0.102116 -0.266807 -0.158326 0.191974 5 -0.278665 -0.139347 0.471131 0.374119 -0.457546 6 -0.443647E-01 -0.662038 0.309917 -0.410973 0.122537 7 -0.172831 -0.594385 -0.323532 0.193281 0.263255 8 -0.737795E-01 0.598201E-01 -0.478578E-02 0.681352 0.543477 Col 6 Row 1 0.417974 2 -0.153778 3 -0.671006E-01 4 0.555294E-01 5 0.729012E-01 6 -0.523606 7 0.533219 8 -0.479858 The R factor: Col 1 2 3 4 5 Row 1 -1.49034 -0.900250 -0.712893 -1.22167 -1.31907 2 0. -1.07960 -0.657066 -0.685264 -0.398652 3 0. 0. 1.20747 0.222782 0.560734 4 0. 0. 0. 0.753777 -0.424101 5 0. 0. 0. 0. 0.742417 6 0. 0. 0. 0. 0. Col 6 Row 1 -0.932936 2 -0.312746 3 0.527843 4 -0.231228 5 0.508359 6 -0.277161 The product Q * R: Col 1 2 3 4 5 Row 1 0.218418 0.438290E-01 0.897504 0.260303 0.861216 2 0.956318 0.633966 0.350752 0.912484 0.453794 3 0.829509 0.617272E-01 0.945448E-01 0.113664 0.911977 4 0.561695 0.449539 0.136169E-01 0.351629 0.597917 5 0.415307 0.401306 0.859097 0.822887 0.188955 6 0.661187E-01 0.754673 0.840847 0.267132 0.761492 7 0.257578 0.797287 0.123104 0.692066 0.396988 8 0.109957 0.183837E-02 0.751236E-02 0.561662 0.185314 Col 6 Row 1 0.574366 2 0.367027 3 0.617205 4 0.361529 5 0.212930 6 0.714471 7 0.117707 8 0.299329 DGESVD_TEST For a double precision real matrix (D) in general storage mode (GE): DGESVD computes the singular value decomposition: A = U * S * V' The matrix A: Col 1 2 3 4 Row 1 0.218418 0.257578 0.401306 0.945448E-01 2 0.956318 0.109957 0.754673 0.136169E-01 3 0.829509 0.438290E-01 0.797287 0.859097 4 0.561695 0.633966 0.183837E-02 0.840847 5 0.415307 0.617272E-01 0.897504 0.123104 6 0.661187E-01 0.449539 0.350752 0.751236E-02 Singular values 1 2.2289838 2 1.0317514 3 0.60630364 4 0.44109794 Left singular vectors U: Col 1 2 3 4 5 Row 1 -0.214893 0.702687E-01 -0.351627 0.141528 -0.663582 2 -0.493857 0.399434 -0.408471E-01 -0.765911 -0.201888E-01 3 -0.621035 -0.122005 0.541178 0.351135 -0.300880 4 -0.378730 -0.803888 -0.211678 -0.195040 0.293355 5 -0.394186 0.417037 -0.113540 0.424627 0.612954 6 -0.159444 0.217747E-01 -0.723960 0.227388 -0.833789E-01 Col 6 Row 1 -0.604045 2 0.886624E-01 3 0.304520 4 -0.203526 5 -0.319037 6 0.625563 Right singular vectors V': Col 1 2 3 4 Row 1 -0.637670 -0.212197 -0.612157 -0.416669 2 0.186361E-01 -0.404587 0.593962 -0.695105 3 0.196482 -0.887338 -0.159466 0.385482 4 -0.744597 -0.625492E-01 0.497035 0.441157 The product U * S * V': Col 1 2 3 4 Row 1 0.218418 0.257578 0.401306 0.945448E-01 2 0.956318 0.109957 0.754673 0.136169E-01 3 0.829509 0.438290E-01 0.797287 0.859097 4 0.561695 0.633966 0.183837E-02 0.840847 5 0.415307 0.617272E-01 0.897504 0.123104 6 0.661187E-01 0.449539 0.350752 0.751236E-02 DGETRF_TEST DGETRF factors a general matrix; DGETRS solves a linear system; For a double precision real matrix (D) in general storage mode (GE): Partial solution (all should be 1) 1 1.0000000 2 1.0000000 3 1.0000000 4 1.0000000 5 1.0000000 DGETRI_TEST DGETRI computes the inverse of a double precision real matrix (D) in general storage mode (GE): The matrix A: Col 1 2 3 Row 1 1. 2. 3. 2 4. 5. 6. 3 7. 8. 0. The inverse matrix: Col 1 2 3 Row 1 -1.77778 0.888889 -0.111111 2 1.55556 -0.777778 0.222222 3 -0.111111 0.222222 -0.111111 DGTSV_TEST DGTSV factors and solves a linear system with a general tridiagonal matrix for a double precision real matrix (D) in general tridiagonal storage mode (GT). The system is of order N = 100 Partial solution (Should be 1,2,3...) 1 1.0000000 2 2.0000000 3 3.0000000 4 4.0000000 5 5.0000000 DORMGQR_TEST DORMQR can compute Q' * b. after DGEQRF computes the QR factorization: A = Q * R storing a double precision real matrix (D) in general storage mode (GE). We use these routines to carry out a QR solve of an M by N linear system A * x = b. In this case, our M x N matrix A has more rows than columns: M = 8 N = 6 The matrix A: Col 1 2 3 4 5 Row 1 0.218418 0.438290E-01 0.897504 0.260303 0.861216 2 0.956318 0.633966 0.350752 0.912484 0.453794 3 0.829509 0.617272E-01 0.945448E-01 0.113664 0.911977 4 0.561695 0.449539 0.136169E-01 0.351629 0.597917 5 0.415307 0.401306 0.859097 0.822887 0.188955 6 0.661187E-01 0.754673 0.840847 0.267132 0.761492 7 0.257578 0.797287 0.123104 0.692066 0.396988 8 0.109957 0.183837E-02 0.751236E-02 0.561662 0.185314 Col 6 Row 1 0.574366 2 0.367027 3 0.617205 4 0.361529 5 0.212930 6 0.714471 7 0.117707 8 0.299329 The solution X: 1 1.0000000 2 2.0000000 3 3.0000000 4 4.0000000 5 5.0000000 6 6.0000000 DPBTRF_TEST DPBTRF computes the lower Cholesky factor A = L*L' or the upper Cholesky factor A = U'*U; For a double precision real matrix (D) in positive definite band storage mode (PB): The lower Cholesky factor L: 1.414214 0.000000 0.000000 0.000000 0.000000 -0.707107 1.224745 0.000000 0.000000 0.000000 0.000000 -0.816497 1.154701 0.000000 0.000000 0.000000 0.000000 -0.866025 1.118034 0.000000 0.000000 0.000000 0.000000 -0.894427 1.095445 DPBTRS_TEST DPBTRS solves linear systems for a positive definite symmetric band matrix, stored as a double precision real matrix (D) in positive definite band storage mode (PB): Partial solution (all should be 1) 1 1.0000000 2 1.0000000 3 1.0000000 4 1.0000000 5 1.0000000 DPOTRF_TEST DPOTRF computes the Cholesky factorization R'*R for a double precision real matrix (D) in positive definite storage mode (PO). The matrix A: Col 1 2 3 4 5 Row 1 2. -1. 0. 0. 0. 2 -1. 2. -1. 0. 0. 3 0. -1. 2. -1. 0. 4 0. 0. -1. 2. -1. 5 0. 0. 0. -1. 2. The Cholesky factor R: Col 1 2 3 4 5 Row 1 1.41421 -0.707107 0. 0. 0. 2 0. 1.22474 -0.816497 0. 0. 3 0. 0. 1.15470 -0.866025 0. 4 0. 0. 0. 1.11803 -0.894427 5 0. 0. 0. 0. 1.09545 The product R' * R Col 1 2 3 4 5 Row 1 2.00000 -1. 0. 0. 0. 2 -1. 2.00000 -1. 0. 0. 3 0. -1. 2. -1. 0. 4 0. 0. -1. 2.00000 -1. 5 0. 0. 0. -1. 2.00000 DPOTRI_TEST DPOTRI computes the inverse for a double precision real matrix (D) in positive definite storage mode (PO). The matrix A: Col 1 2 3 4 5 Row 1 2. -1. 0. 0. 0. 2 -1. 2. -1. 0. 0. 3 0. -1. 2. -1. 0. 4 0. 0. -1. 2. -1. 5 0. 0. 0. -1. 2. The Cholesky factor R: Col 1 2 3 4 5 Row 1 1.41421 -0.707107 0. 0. 0. 2 0. 1.22474 -0.816497 0. 0. 3 0. 0. 1.15470 -0.866025 0. 4 0. 0. 0. 1.11803 -0.894427 5 0. 0. 0. 0. 1.09545 The product R' * R Col 1 2 3 4 5 Row 1 2.00000 -1. 0. 0. 0. 2 -1. 2.00000 -1. 0. 0. 3 0. -1. 2. -1. 0. 4 0. 0. -1. 2.00000 -1. 5 0. 0. 0. -1. 2.00000 The inverse matrix B: Col 1 2 3 4 5 Row 1 0.833333 0.666667 0.500000 0.333333 0.166667 2 0.666667 1.33333 1.00000 0.666667 0.333333 3 0.500000 1.00000 1.50000 1. 0.500000 4 0.333333 0.666667 1. 1.33333 0.666667 5 0.166667 0.333333 0.500000 0.666667 0.833333 The product B * A Col 1 2 3 4 5 Row 1 1.00000 0.111022E-15 0.222045E-15 -0.222045E-15 0. 2 -0.444089E-15 1.00000 -0.222045E-15 -0.555112E-16 -0.111022E-15 3 0. 0.222045E-15 1.00000 -0.166533E-15 -0.111022E-15 4 -0.222045E-15 0.222045E-15 0.222045E-15 1.00000 0. 5 -0.555112E-16 0.555112E-16 0.555112E-16 -0.222045E-15 1. DSBGVX_TEST DSBGVX solves the generalized eigenvalue problem A * X = LAMBDA * B * X for a symmetric banded NxN matrix A, and a symmetric banded positive definite NxN matrix B, Computed eigenvalues 1 1.0581164 Computed eigenvalues 1 4.7709121 DSYEV_TEST DSYEV computes eigenvalues and eigenvectors For a double precision real matrix (D) in symmetric storage mode (SY). The matrix A: Col 1 2 3 4 5 Row 1 0. 2.44949 0. 0. 0. 2 2.44949 0. 3.16228 0. 0. 3 0. 3.16228 0. 3.46410 0. 4 0. 0. 3.46410 0. 3.46410 5 0. 0. 0. 3.46410 0. 6 0. 0. 0. 0. 3.16228 7 0. 0. 0. 0. 0. Col 6 7 Row 1 0. 0. 2 0. 0. 3 0. 0. 4 0. 0. 5 3.16228 0. 6 0. 2.44949 7 2.44949 0. The eigenvalues: 1 -6.0000000 2 -4.0000000 3 -2.0000000 4 -0.67072288E-15 5 2.0000000 6 4.0000000 7 6.0000000 The eigenvector matrix: Col 1 2 3 4 5 Row 1 -0.125000 0.306186 0.484123 -0.559017 -0.484123 2 0.306186 -0.500000 -0.395285 -0.315775E-15 -0.395285 3 -0.484123 0.395285 -0.125000 0.433013 0.125000 4 0.559017 0.336779E-15 0.433013 -0.862557E-16 0.433013 5 -0.484123 -0.395285 -0.125000 -0.433013 0.125000 6 0.306186 0.500000 -0.395285 0.157289E-15 -0.395285 7 -0.125000 -0.306186 0.484123 0.559017 -0.484123 Col 6 7 Row 1 -0.306186 0.125000 2 -0.500000 0.306186 3 -0.395285 0.484123 4 0.104083E-16 0.559017 5 0.395285 0.484123 6 0.500000 0.306186 7 0.306186 0.125000 LAPACK_EXAMPLES_TEST Normal end of execution.