24 January 2018 10:19:36.403 PM PDFLIB_TEST FORTRAN77 version Test the PDFLIB library. INITIALIZE - Note: The RNGLIB package has been initialized. TEST01 R8MAT_POFAC computes the Cholesky factor R of a positive definite matrix A, so that A = R'* R. Start with random R1; Compute A = R1' * R1. Call R8MAT_POFAC and see if you recover R2 = R1. R1: Col 1 2 3 4 5 Row 1: 0.323711 0.324392 0.288730 0.566211 0.895177 2: 0.00000 0.493388 0.353007 0.820720 0.336599 3: 0.00000 0.00000 0.153961 0.325495 0.285023 4: 0.00000 0.00000 0.00000 0.340080 0.503381 5: 0.00000 0.00000 0.00000 0.00000 0.773531 A: Col 1 2 3 4 5 Row 1: 0.104789 0.105009 0.934649E-01 0.183289 0.289778 2: 0.105009 0.348662 0.267831 0.588607 0.456462 3: 0.934649E-01 0.267831 0.231683 0.503315 0.421168 4: 0.183289 0.588607 0.503315 1.21578 1.04708 5: 0.289778 0.456462 0.421168 1.04708 1.84762 Frobenius difference between R1 and R2 = 0.122502E-14 TEST02 R8VEC_MULTINORMAL_PDF evaluates the PDF for the multinormal distribution. The covariance matrix is C. The definition uses the inverse of C; R8VEC_MULTINORMAL_PDF uses the Cholesky factor. Verify that the algorithms are equivalent. R1: Col 1 2 3 4 5 Row 1: 0.211569E-01 0.370131E-01 0.860775E-01 0.208128 0.395446 2: 0.00000 0.290597 0.747587 0.797663E-01 0.764420 3: 0.00000 0.00000 0.359446 0.147932 0.645941 4: 0.00000 0.00000 0.00000 0.708155 0.473061 5: 0.00000 0.00000 0.00000 0.00000 0.859549 C: Col 1 2 3 4 5 Row 1: 0.447614E-03 0.783082E-03 0.182113E-02 0.440334E-02 0.836641E-02 2: 0.783082E-03 0.858166E-01 0.220433 0.308833E-01 0.236775 3: 0.182113E-02 0.220433 0.695497 0.130721 0.837690 4: 0.440334E-02 0.308833E-01 0.130721 0.573048 0.573835 5: 0.836641E-02 0.236775 0.837690 0.573835 2.12057 R2: Col 1 2 3 4 5 Row 1: 0.211569E-01 0.370131E-01 0.860775E-01 0.208128 0.395446 2: 0.00000 0.290597 0.747587 0.797663E-01 0.764420 3: 0.00000 0.00000 0.359446 0.147932 0.645941 4: 0.00000 0.00000 0.00000 0.708155 0.473061 5: 0.00000 0.00000 0.00000 0.00000 0.859549 Determinant of C = 0.180947E-05 C_INV: Col 1 2 3 4 5 Row 1: 2550.75 -61.1210 28.6732 -11.3317 -11.4995 2: 0.00000 67.2117 -23.5808 0.236015 1.98780 3: 0.00000 0.00000 11.2135 0.555570 -2.06019 4: 0.00000 0.00000 0.00000 2.59808 -0.904165 5: 0.00000 0.00000 0.00000 0.00000 1.35350 PDF1 = 7.48736 PDF2 = 7.48709 TEST03 R8_CHI_SAMPLE ( DF ) samples the Chi distribution with DF degrees of freedom. INITIALIZE initializes the random number generator. It only needs to be called once before using the package. INITIALIZE - Note: The RNGLIB package has been initialized. Current generator index = 2 I DF R8_CHI_SAMPLE ( DF ) 1 3.10629 4.66215 2 5.26012 7.20377 3 2.96542 7.98763 4 3.68364 2.67281 5 3.85438 2.06680 6 2.73145 2.56831 7 1.72521 0.431697 8 2.42439 1.56641 9 5.84687 9.92267 10 1.76515 0.415013 PDFLIB_TEST Normal end of execution. 24 January 2018 10:19:36.405 PM