C ALGORITHM 828, COLLECTED ALGORITHMS FROM ACM. C THIS WORK PUBLISHED IN TRANSACTIONS ON MATHEMATICAL SOFTWARE, C VOL. 29,NO. 4, December, 2003, P. 458--468. #! /bin/sh # This is a shell archive, meaning: # 1. Remove everything above the #! /bin/sh line. # 2. Save the resulting text in a file. # 3. Execute the file with /bin/sh (not csh) to create the files: # Fortran77/ # Fortran77/Dp/ # Fortran77/Dp/Drivers/ # Fortran77/Dp/Drivers/Makefile # Fortran77/Dp/Drivers/data1 # Fortran77/Dp/Drivers/data2 # Fortran77/Dp/Drivers/data3 # Fortran77/Dp/Drivers/data4 # Fortran77/Dp/Drivers/data5 # Fortran77/Dp/Drivers/dblas.f # Fortran77/Dp/Drivers/driver.f # Fortran77/Dp/Drivers/interactive.f # Fortran77/Dp/Drivers/lapack.f # Fortran77/Dp/Drivers/res1 # Fortran77/Dp/Drivers/res1_1 # Fortran77/Dp/Drivers/res1_2 # Fortran77/Dp/Drivers/res2 # Fortran77/Dp/Drivers/res2_1 # Fortran77/Dp/Drivers/res2_2 # Fortran77/Dp/Drivers/res3 # Fortran77/Dp/Drivers/res3_1 # Fortran77/Dp/Drivers/res3_2 # Fortran77/Dp/Drivers/res4 # Fortran77/Dp/Drivers/res4_1 # Fortran77/Dp/Drivers/res4_2 # Fortran77/Dp/Drivers/res5 # Fortran77/Dp/Drivers/res5_1 # Fortran77/Dp/Drivers/res5_2 # Fortran77/Dp/Src/ # Fortran77/Dp/Src/src.f # This archive created: Fri Jan 23 09:47:26 2004 export PATH; PATH=/bin:$PATH if test ! -d 'Fortran77' then mkdir 'Fortran77' fi cd 'Fortran77' if test ! -d 'Dp' then mkdir 'Dp' fi cd 'Dp' if test ! -d 'Drivers' then mkdir 'Drivers' fi cd 'Drivers' if test -f 'Makefile' then echo shar: will not over-write existing file "'Makefile'" else cat << "SHAR_EOF" > 'Makefile' # This makefile is primarily for checking the implementation # against results already obtained. To do this efficiently the # interactive driver has been editted to take input from stdin # and put output on stdout. All the other files for PS plots are # generated by default and then overwritten. # # The file interactive.f is the original driver that prompts for # a data file and aske the user whether various other files should # be created. include makefile.inc all: Res1 Res2 Res3 Res4 Res5 SRCLIBS= $(LAPACK) $(BLAS) src.o: $(INCSRC)/src.f $(F77) $(F77OPTS) -c $(INCSRC)/src.f DRIVERS= driver RESULTS= Res1 Res2 Res3 Res4 Res5 Objs1= driver.o src.o driver: $(Objs1) $(F77LINK) $(F77LINKOPTS) -o driver $(Objs1) $(SRCLIBS) Res1: driver data1 ./driver Res1_1 mv dnsplin1.prt Res1_2 Res2: driver data2 ./driver Res2_1 mv dnsplin1.prt Res2_2 Res3: driver data3 ./driver Res3_1 mv dnsplin1.prt Res3_2 Res4: driver data4 ./driver Res4_1 mv dnsplin1.prt Res4_2 Res5: driver data5 ./driver Res5_1 mv dnsplin1.prt Res5_2 diffres: Res1 res1 Res1 res1 Res3 res3 Res4 res4 Res5 res5 echo "Differences in results from driver" $(DIFF) Res1 res1 echo "Differences in results from driver" $(DIFF) Res2 res2 echo "Differences in results from driver" $(DIFF) Res3 res3 echo "Differences in results from driver" $(DIFF) Res4 res4 echo "Differences in results from driver" $(DIFF) Res5 res5 clean: rm -rf *.o $(DRIVERS) $(CLEANUP) $(RESULTS) dnsplin1.ps\ dnsplin1.ps0 dnsplin1.ps2 SHAR_EOF fi # end of overwriting check if test -f 'data1' then echo shar: will not over-write existing file "'data1'" else cat << "SHAR_EOF" > 'data1' 7 Number of data points N (format I4) 0.0 Abscissa of first point (format D22.15) 1.0 Abscissa of second point (format D22.15) 2.0 3.0 4.0 5.0 6.0 0.0 Ordinate of first point (format D22.15) 1.9 Ordinate of second point (format D22.15) 2.7 2.6 1.6 0.8 1.2 0.025 Mesh width H (format D22.15) SHAR_EOF fi # end of overwriting check if test -f 'data2' then echo shar: will not over-write existing file "'data2'" else cat << "SHAR_EOF" > 'data2' 11 0.0 2.0 3.0 5.0 6.0 8.0 9.0 11.0 12.0 14.0 15.0 0.0 0.0 0.0 0.0 0.0 0.0 0.1 1.0 7.0 8.0 15.0 0.0625 SHAR_EOF fi # end of overwriting check if test -f 'data3' then echo shar: will not over-write existing file "'data3'" else cat << "SHAR_EOF" > 'data3' 9 7.99 8.09 8.19 8.70 9.20 10.0 12.0 15.0 20.0 0.0 .276429e-3 .437498 1.69183 4.69428 9.43740 9.98636 9.99919 9.99994 .05 SHAR_EOF fi # end of overwriting check if test -f 'data4' then echo shar: will not over-write existing file "'data4'" else cat << "SHAR_EOF" > 'data4' 10 0.0 1.0 1.5 2.5 4.0 4.5 5.5 6.0 8.0 10.0 10.0 8.0 5.0 4.0 3.5 3.4 6.0 7.1 8.0 8.5 .04 SHAR_EOF fi # end of overwriting check if test -f 'data5' then echo shar: will not over-write existing file "'data5'" else cat << "SHAR_EOF" > 'data5' 11 0.0 0.1 0.2 0.3 0.4 0.5 0.6 0.7 0.8 0.9 1.0 0.0 0.15 1.015 1.0 0.515 0.5 0.5 0.5 0.5 0.18 0.0 0.004 SHAR_EOF fi # end of overwriting check if test -f 'dblas.f' then echo shar: will not over-write existing file "'dblas.f'" else cat << "SHAR_EOF" > 'dblas.f' SUBROUTINE DGEMM ( TRANSA, TRANSB, M, N, K, ALPHA, A, LDA, B, LDB, $ BETA, C, LDC ) * .. Scalar Arguments .. CHARACTER*1 TRANSA, TRANSB INTEGER M, N, K, LDA, LDB, LDC DOUBLE PRECISION ALPHA, BETA * .. Array Arguments .. DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ) * .. * * Purpose * ======= * * DGEMM performs one of the matrix-matrix operations * * C := alpha*op( A )*op( B ) + beta*C, * * where op( X ) is one of * * op( X ) = X or op( X ) = X', * * alpha and beta are scalars, and A, B and C are matrices, with op( A ) * an m by k matrix, op( B ) a k by n matrix and C an m by n matrix. * * Parameters * ========== * * TRANSA - CHARACTER*1. * On entry, TRANSA specifies the form of op( A ) to be used in * the matrix multiplication as follows: * * TRANSA = 'N' or 'n', op( A ) = A. * * TRANSA = 'T' or 't', op( A ) = A'. * * TRANSA = 'C' or 'c', op( A ) = A'. * * Unchanged on exit. * * TRANSB - CHARACTER*1. * On entry, TRANSB specifies the form of op( B ) to be used in * the matrix multiplication as follows: * * TRANSB = 'N' or 'n', op( B ) = B. * * TRANSB = 'T' or 't', op( B ) = B'. * * TRANSB = 'C' or 'c', op( B ) = B'. * * Unchanged on exit. * * M - INTEGER. * On entry, M specifies the number of rows of the matrix * op( A ) and of the matrix C. M must be at least zero. * Unchanged on exit. * * N - INTEGER. * On entry, N specifies the number of columns of the matrix * op( B ) and the number of columns of the matrix C. N must be * at least zero. * Unchanged on exit. * * K - INTEGER. * On entry, K specifies the number of columns of the matrix * op( A ) and the number of rows of the matrix op( B ). K must * be at least zero. * Unchanged on exit. * * ALPHA - DOUBLE PRECISION. * On entry, ALPHA specifies the scalar alpha. * Unchanged on exit. * * A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is * k when TRANSA = 'N' or 'n', and is m otherwise. * Before entry with TRANSA = 'N' or 'n', the leading m by k * part of the array A must contain the matrix A, otherwise * the leading k by m part of the array A must contain the * matrix A. * Unchanged on exit. * * LDA - INTEGER. * On entry, LDA specifies the first dimension of A as declared * in the calling (sub) program. When TRANSA = 'N' or 'n' then * LDA must be at least max( 1, m ), otherwise LDA must be at * least max( 1, k ). * Unchanged on exit. * * B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is * n when TRANSB = 'N' or 'n', and is k otherwise. * Before entry with TRANSB = 'N' or 'n', the leading k by n * part of the array B must contain the matrix B, otherwise * the leading n by k part of the array B must contain the * matrix B. * Unchanged on exit. * * LDB - INTEGER. * On entry, LDB specifies the first dimension of B as declared * in the calling (sub) program. When TRANSB = 'N' or 'n' then * LDB must be at least max( 1, k ), otherwise LDB must be at * least max( 1, n ). * Unchanged on exit. * * BETA - DOUBLE PRECISION. * On entry, BETA specifies the scalar beta. When BETA is * supplied as zero then C need not be set on input. * Unchanged on exit. * * C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). * Before entry, the leading m by n part of the array C must * contain the matrix C, except when beta is zero, in which * case C need not be set on entry. * On exit, the array C is overwritten by the m by n matrix * ( alpha*op( A )*op( B ) + beta*C ). * * LDC - INTEGER. * On entry, LDC specifies the first dimension of C as declared * in the calling (sub) program. LDC must be at least * max( 1, m ). * Unchanged on exit. * * * Level 3 Blas routine. * * -- Written on 8-February-1989. * Jack Dongarra, Argonne National Laboratory. * Iain Duff, AERE Harwell. * Jeremy Du Croz, Numerical Algorithms Group Ltd. * Sven Hammarling, Numerical Algorithms Group Ltd. * * * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. External Subroutines .. EXTERNAL XERBLA * .. Intrinsic Functions .. INTRINSIC MAX * .. Local Scalars .. LOGICAL NOTA, NOTB INTEGER I, INFO, J, L, NCOLA, NROWA, NROWB DOUBLE PRECISION TEMP * .. Parameters .. DOUBLE PRECISION ONE , ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Executable Statements .. * * Set NOTA and NOTB as true if A and B respectively are not * transposed and set NROWA, NCOLA and NROWB as the number of rows * and columns of A and the number of rows of B respectively. * NOTA = LSAME( TRANSA, 'N' ) NOTB = LSAME( TRANSB, 'N' ) IF( NOTA )THEN NROWA = M NCOLA = K ELSE NROWA = K NCOLA = M END IF IF( NOTB )THEN NROWB = K ELSE NROWB = N END IF * * Test the input parameters. * INFO = 0 IF( ( .NOT.NOTA ).AND. $ ( .NOT.LSAME( TRANSA, 'C' ) ).AND. $ ( .NOT.LSAME( TRANSA, 'T' ) ) )THEN INFO = 1 ELSE IF( ( .NOT.NOTB ).AND. $ ( .NOT.LSAME( TRANSB, 'C' ) ).AND. $ ( .NOT.LSAME( TRANSB, 'T' ) ) )THEN INFO = 2 ELSE IF( M .LT.0 )THEN INFO = 3 ELSE IF( N .LT.0 )THEN INFO = 4 ELSE IF( K .LT.0 )THEN INFO = 5 ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN INFO = 8 ELSE IF( LDB.LT.MAX( 1, NROWB ) )THEN INFO = 10 ELSE IF( LDC.LT.MAX( 1, M ) )THEN INFO = 13 END IF IF( INFO.NE.0 )THEN CALL XERBLA( 'DGEMM ', INFO ) RETURN END IF * * Quick return if possible. * IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) $ RETURN * * And if alpha.eq.zero. * IF( ALPHA.EQ.ZERO )THEN IF( BETA.EQ.ZERO )THEN DO 20, J = 1, N DO 10, I = 1, M C( I, J ) = ZERO 10 CONTINUE 20 CONTINUE ELSE DO 40, J = 1, N DO 30, I = 1, M C( I, J ) = BETA*C( I, J ) 30 CONTINUE 40 CONTINUE END IF RETURN END IF * * Start the operations. * IF( NOTB )THEN IF( NOTA )THEN * * Form C := alpha*A*B + beta*C. * DO 90, J = 1, N IF( BETA.EQ.ZERO )THEN DO 50, I = 1, M C( I, J ) = ZERO 50 CONTINUE ELSE IF( BETA.NE.ONE )THEN DO 60, I = 1, M C( I, J ) = BETA*C( I, J ) 60 CONTINUE END IF DO 80, L = 1, K IF( B( L, J ).NE.ZERO )THEN TEMP = ALPHA*B( L, J ) DO 70, I = 1, M C( I, J ) = C( I, J ) + TEMP*A( I, L ) 70 CONTINUE END IF 80 CONTINUE 90 CONTINUE ELSE * * Form C := alpha*A'*B + beta*C * DO 120, J = 1, N DO 110, I = 1, M TEMP = ZERO DO 100, L = 1, K TEMP = TEMP + A( L, I )*B( L, J ) 100 CONTINUE IF( BETA.EQ.ZERO )THEN C( I, J ) = ALPHA*TEMP ELSE C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) END IF 110 CONTINUE 120 CONTINUE END IF ELSE IF( NOTA )THEN * * Form C := alpha*A*B' + beta*C * DO 170, J = 1, N IF( BETA.EQ.ZERO )THEN DO 130, I = 1, M C( I, J ) = ZERO 130 CONTINUE ELSE IF( BETA.NE.ONE )THEN DO 140, I = 1, M C( I, J ) = BETA*C( I, J ) 140 CONTINUE END IF DO 160, L = 1, K IF( B( J, L ).NE.ZERO )THEN TEMP = ALPHA*B( J, L ) DO 150, I = 1, M C( I, J ) = C( I, J ) + TEMP*A( I, L ) 150 CONTINUE END IF 160 CONTINUE 170 CONTINUE ELSE * * Form C := alpha*A'*B' + beta*C * DO 200, J = 1, N DO 190, I = 1, M TEMP = ZERO DO 180, L = 1, K TEMP = TEMP + A( L, I )*B( J, L ) 180 CONTINUE IF( BETA.EQ.ZERO )THEN C( I, J ) = ALPHA*TEMP ELSE C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) END IF 190 CONTINUE 200 CONTINUE END IF END IF * RETURN * * End of DGEMM . * END SUBROUTINE DSYMM ( SIDE, UPLO, M, N, ALPHA, A, LDA, B, LDB, $ BETA, C, LDC ) * .. Scalar Arguments .. CHARACTER*1 SIDE, UPLO INTEGER M, N, LDA, LDB, LDC DOUBLE PRECISION ALPHA, BETA * .. Array Arguments .. DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ) * .. * * Purpose * ======= * * DSYMM performs one of the matrix-matrix operations * * C := alpha*A*B + beta*C, * * or * * C := alpha*B*A + beta*C, * * where alpha and beta are scalars, A is a symmetric matrix and B and * C are m by n matrices. * * Parameters * ========== * * SIDE - CHARACTER*1. * On entry, SIDE specifies whether the symmetric matrix A * appears on the left or right in the operation as follows: * * SIDE = 'L' or 'l' C := alpha*A*B + beta*C, * * SIDE = 'R' or 'r' C := alpha*B*A + beta*C, * * Unchanged on exit. * * UPLO - CHARACTER*1. * On entry, UPLO specifies whether the upper or lower * triangular part of the symmetric matrix A is to be * referenced as follows: * * UPLO = 'U' or 'u' Only the upper triangular part of the * symmetric matrix is to be referenced. * * UPLO = 'L' or 'l' Only the lower triangular part of the * symmetric matrix is to be referenced. * * Unchanged on exit. * * M - INTEGER. * On entry, M specifies the number of rows of the matrix C. * M must be at least zero. * Unchanged on exit. * * N - INTEGER. * On entry, N specifies the number of columns of the matrix C. * N must be at least zero. * Unchanged on exit. * * ALPHA - DOUBLE PRECISION. * On entry, ALPHA specifies the scalar alpha. * Unchanged on exit. * * A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is * m when SIDE = 'L' or 'l' and is n otherwise. * Before entry with SIDE = 'L' or 'l', the m by m part of * the array A must contain the symmetric matrix, such that * when UPLO = 'U' or 'u', the leading m by m upper triangular * part of the array A must contain the upper triangular part * of the symmetric matrix and the strictly lower triangular * part of A is not referenced, and when UPLO = 'L' or 'l', * the leading m by m lower triangular part of the array A * must contain the lower triangular part of the symmetric * matrix and the strictly upper triangular part of A is not * referenced. * Before entry with SIDE = 'R' or 'r', the n by n part of * the array A must contain the symmetric matrix, such that * when UPLO = 'U' or 'u', the leading n by n upper triangular * part of the array A must contain the upper triangular part * of the symmetric matrix and the strictly lower triangular * part of A is not referenced, and when UPLO = 'L' or 'l', * the leading n by n lower triangular part of the array A * must contain the lower triangular part of the symmetric * matrix and the strictly upper triangular part of A is not * referenced. * Unchanged on exit. * * LDA - INTEGER. * On entry, LDA specifies the first dimension of A as declared * in the calling (sub) program. When SIDE = 'L' or 'l' then * LDA must be at least max( 1, m ), otherwise LDA must be at * least max( 1, n ). * Unchanged on exit. * * B - DOUBLE PRECISION array of DIMENSION ( LDB, n ). * Before entry, the leading m by n part of the array B must * contain the matrix B. * Unchanged on exit. * * LDB - INTEGER. * On entry, LDB specifies the first dimension of B as declared * in the calling (sub) program. LDB must be at least * max( 1, m ). * Unchanged on exit. * * BETA - DOUBLE PRECISION. * On entry, BETA specifies the scalar beta. When BETA is * supplied as zero then C need not be set on input. * Unchanged on exit. * * C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). * Before entry, the leading m by n part of the array C must * contain the matrix C, except when beta is zero, in which * case C need not be set on entry. * On exit, the array C is overwritten by the m by n updated * matrix. * * LDC - INTEGER. * On entry, LDC specifies the first dimension of C as declared * in the calling (sub) program. LDC must be at least * max( 1, m ). * Unchanged on exit. * * * Level 3 Blas routine. * * -- Written on 8-February-1989. * Jack Dongarra, Argonne National Laboratory. * Iain Duff, AERE Harwell. * Jeremy Du Croz, Numerical Algorithms Group Ltd. * Sven Hammarling, Numerical Algorithms Group Ltd. * * * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. External Subroutines .. EXTERNAL XERBLA * .. Intrinsic Functions .. INTRINSIC MAX * .. Local Scalars .. LOGICAL UPPER INTEGER I, INFO, J, K, NROWA DOUBLE PRECISION TEMP1, TEMP2 * .. Parameters .. DOUBLE PRECISION ONE , ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Executable Statements .. * * Set NROWA as the number of rows of A. * IF( LSAME( SIDE, 'L' ) )THEN NROWA = M ELSE NROWA = N END IF UPPER = LSAME( UPLO, 'U' ) * * Test the input parameters. * INFO = 0 IF( ( .NOT.LSAME( SIDE, 'L' ) ).AND. $ ( .NOT.LSAME( SIDE, 'R' ) ) )THEN INFO = 1 ELSE IF( ( .NOT.UPPER ).AND. $ ( .NOT.LSAME( UPLO, 'L' ) ) )THEN INFO = 2 ELSE IF( M .LT.0 )THEN INFO = 3 ELSE IF( N .LT.0 )THEN INFO = 4 ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN INFO = 7 ELSE IF( LDB.LT.MAX( 1, M ) )THEN INFO = 9 ELSE IF( LDC.LT.MAX( 1, M ) )THEN INFO = 12 END IF IF( INFO.NE.0 )THEN CALL XERBLA( 'DSYMM ', INFO ) RETURN END IF * * Quick return if possible. * IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. $ ( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) $ RETURN * * And when alpha.eq.zero. * IF( ALPHA.EQ.ZERO )THEN IF( BETA.EQ.ZERO )THEN DO 20, J = 1, N DO 10, I = 1, M C( I, J ) = ZERO 10 CONTINUE 20 CONTINUE ELSE DO 40, J = 1, N DO 30, I = 1, M C( I, J ) = BETA*C( I, J ) 30 CONTINUE 40 CONTINUE END IF RETURN END IF * * Start the operations. * IF( LSAME( SIDE, 'L' ) )THEN * * Form C := alpha*A*B + beta*C. * IF( UPPER )THEN DO 70, J = 1, N DO 60, I = 1, M TEMP1 = ALPHA*B( I, J ) TEMP2 = ZERO DO 50, K = 1, I - 1 C( K, J ) = C( K, J ) + TEMP1 *A( K, I ) TEMP2 = TEMP2 + B( K, J )*A( K, I ) 50 CONTINUE IF( BETA.EQ.ZERO )THEN C( I, J ) = TEMP1*A( I, I ) + ALPHA*TEMP2 ELSE C( I, J ) = BETA *C( I, J ) + $ TEMP1*A( I, I ) + ALPHA*TEMP2 END IF 60 CONTINUE 70 CONTINUE ELSE DO 100, J = 1, N DO 90, I = M, 1, -1 TEMP1 = ALPHA*B( I, J ) TEMP2 = ZERO DO 80, K = I + 1, M C( K, J ) = C( K, J ) + TEMP1 *A( K, I ) TEMP2 = TEMP2 + B( K, J )*A( K, I ) 80 CONTINUE IF( BETA.EQ.ZERO )THEN C( I, J ) = TEMP1*A( I, I ) + ALPHA*TEMP2 ELSE C( I, J ) = BETA *C( I, J ) + $ TEMP1*A( I, I ) + ALPHA*TEMP2 END IF 90 CONTINUE 100 CONTINUE END IF ELSE * * Form C := alpha*B*A + beta*C. * DO 170, J = 1, N TEMP1 = ALPHA*A( J, J ) IF( BETA.EQ.ZERO )THEN DO 110, I = 1, M C( I, J ) = TEMP1*B( I, J ) 110 CONTINUE ELSE DO 120, I = 1, M C( I, J ) = BETA*C( I, J ) + TEMP1*B( I, J ) 120 CONTINUE END IF DO 140, K = 1, J - 1 IF( UPPER )THEN TEMP1 = ALPHA*A( K, J ) ELSE TEMP1 = ALPHA*A( J, K ) END IF DO 130, I = 1, M C( I, J ) = C( I, J ) + TEMP1*B( I, K ) 130 CONTINUE 140 CONTINUE DO 160, K = J + 1, N IF( UPPER )THEN TEMP1 = ALPHA*A( J, K ) ELSE TEMP1 = ALPHA*A( K, J ) END IF DO 150, I = 1, M C( I, J ) = C( I, J ) + TEMP1*B( I, K ) 150 CONTINUE 160 CONTINUE 170 CONTINUE END IF * RETURN * * End of DSYMM . * END SUBROUTINE DSYR2K( UPLO, TRANS, N, K, ALPHA, A, LDA, B, LDB, $ BETA, C, LDC ) * .. Scalar Arguments .. CHARACTER*1 UPLO, TRANS INTEGER N, K, LDA, LDB, LDC DOUBLE PRECISION ALPHA, BETA * .. Array Arguments .. DOUBLE PRECISION A( LDA, * ), B( LDB, * ), C( LDC, * ) * .. * * Purpose * ======= * * DSYR2K performs one of the symmetric rank 2k operations * * C := alpha*A*B' + alpha*B*A' + beta*C, * * or * * C := alpha*A'*B + alpha*B'*A + beta*C, * * where alpha and beta are scalars, C is an n by n symmetric matrix * and A and B are n by k matrices in the first case and k by n * matrices in the second case. * * Parameters * ========== * * UPLO - CHARACTER*1. * On entry, UPLO specifies whether the upper or lower * triangular part of the array C is to be referenced as * follows: * * UPLO = 'U' or 'u' Only the upper triangular part of C * is to be referenced. * * UPLO = 'L' or 'l' Only the lower triangular part of C * is to be referenced. * * Unchanged on exit. * * TRANS - CHARACTER*1. * On entry, TRANS specifies the operation to be performed as * follows: * * TRANS = 'N' or 'n' C := alpha*A*B' + alpha*B*A' + * beta*C. * * TRANS = 'T' or 't' C := alpha*A'*B + alpha*B'*A + * beta*C. * * TRANS = 'C' or 'c' C := alpha*A'*B + alpha*B'*A + * beta*C. * * Unchanged on exit. * * N - INTEGER. * On entry, N specifies the order of the matrix C. N must be * at least zero. * Unchanged on exit. * * K - INTEGER. * On entry with TRANS = 'N' or 'n', K specifies the number * of columns of the matrices A and B, and on entry with * TRANS = 'T' or 't' or 'C' or 'c', K specifies the number * of rows of the matrices A and B. K must be at least zero. * Unchanged on exit. * * ALPHA - DOUBLE PRECISION. * On entry, ALPHA specifies the scalar alpha. * Unchanged on exit. * * A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is * k when TRANS = 'N' or 'n', and is n otherwise. * Before entry with TRANS = 'N' or 'n', the leading n by k * part of the array A must contain the matrix A, otherwise * the leading k by n part of the array A must contain the * matrix A. * Unchanged on exit. * * LDA - INTEGER. * On entry, LDA specifies the first dimension of A as declared * in the calling (sub) program. When TRANS = 'N' or 'n' * then LDA must be at least max( 1, n ), otherwise LDA must * be at least max( 1, k ). * Unchanged on exit. * * B - DOUBLE PRECISION array of DIMENSION ( LDB, kb ), where kb is * k when TRANS = 'N' or 'n', and is n otherwise. * Before entry with TRANS = 'N' or 'n', the leading n by k * part of the array B must contain the matrix B, otherwise * the leading k by n part of the array B must contain the * matrix B. * Unchanged on exit. * * LDB - INTEGER. * On entry, LDB specifies the first dimension of B as declared * in the calling (sub) program. When TRANS = 'N' or 'n' * then LDB must be at least max( 1, n ), otherwise LDB must * be at least max( 1, k ). * Unchanged on exit. * * BETA - DOUBLE PRECISION. * On entry, BETA specifies the scalar beta. * Unchanged on exit. * * C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). * Before entry with UPLO = 'U' or 'u', the leading n by n * upper triangular part of the array C must contain the upper * triangular part of the symmetric matrix and the strictly * lower triangular part of C is not referenced. On exit, the * upper triangular part of the array C is overwritten by the * upper triangular part of the updated matrix. * Before entry with UPLO = 'L' or 'l', the leading n by n * lower triangular part of the array C must contain the lower * triangular part of the symmetric matrix and the strictly * upper triangular part of C is not referenced. On exit, the * lower triangular part of the array C is overwritten by the * lower triangular part of the updated matrix. * * LDC - INTEGER. * On entry, LDC specifies the first dimension of C as declared * in the calling (sub) program. LDC must be at least * max( 1, n ). * Unchanged on exit. * * * Level 3 Blas routine. * * * -- Written on 8-February-1989. * Jack Dongarra, Argonne National Laboratory. * Iain Duff, AERE Harwell. * Jeremy Du Croz, Numerical Algorithms Group Ltd. * Sven Hammarling, Numerical Algorithms Group Ltd. * * * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. External Subroutines .. EXTERNAL XERBLA * .. Intrinsic Functions .. INTRINSIC MAX * .. Local Scalars .. LOGICAL UPPER INTEGER I, INFO, J, L, NROWA DOUBLE PRECISION TEMP1, TEMP2 * .. Parameters .. DOUBLE PRECISION ONE , ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Executable Statements .. * * Test the input parameters. * IF( LSAME( TRANS, 'N' ) )THEN NROWA = N ELSE NROWA = K END IF UPPER = LSAME( UPLO, 'U' ) * INFO = 0 IF( ( .NOT.UPPER ).AND. $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN INFO = 1 ELSE IF( ( .NOT.LSAME( TRANS, 'N' ) ).AND. $ ( .NOT.LSAME( TRANS, 'T' ) ).AND. $ ( .NOT.LSAME( TRANS, 'C' ) ) )THEN INFO = 2 ELSE IF( N .LT.0 )THEN INFO = 3 ELSE IF( K .LT.0 )THEN INFO = 4 ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN INFO = 7 ELSE IF( LDB.LT.MAX( 1, NROWA ) )THEN INFO = 9 ELSE IF( LDC.LT.MAX( 1, N ) )THEN INFO = 12 END IF IF( INFO.NE.0 )THEN CALL XERBLA( 'DSYR2K', INFO ) RETURN END IF * * Quick return if possible. * IF( ( N.EQ.0 ).OR. $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) $ RETURN * * And when alpha.eq.zero. * IF( ALPHA.EQ.ZERO )THEN IF( UPPER )THEN IF( BETA.EQ.ZERO )THEN DO 20, J = 1, N DO 10, I = 1, J C( I, J ) = ZERO 10 CONTINUE 20 CONTINUE ELSE DO 40, J = 1, N DO 30, I = 1, J C( I, J ) = BETA*C( I, J ) 30 CONTINUE 40 CONTINUE END IF ELSE IF( BETA.EQ.ZERO )THEN DO 60, J = 1, N DO 50, I = J, N C( I, J ) = ZERO 50 CONTINUE 60 CONTINUE ELSE DO 80, J = 1, N DO 70, I = J, N C( I, J ) = BETA*C( I, J ) 70 CONTINUE 80 CONTINUE END IF END IF RETURN END IF * * Start the operations. * IF( LSAME( TRANS, 'N' ) )THEN * * Form C := alpha*A*B' + alpha*B*A' + C. * IF( UPPER )THEN DO 130, J = 1, N IF( BETA.EQ.ZERO )THEN DO 90, I = 1, J C( I, J ) = ZERO 90 CONTINUE ELSE IF( BETA.NE.ONE )THEN DO 100, I = 1, J C( I, J ) = BETA*C( I, J ) 100 CONTINUE END IF DO 120, L = 1, K IF( ( A( J, L ).NE.ZERO ).OR. $ ( B( J, L ).NE.ZERO ) )THEN TEMP1 = ALPHA*B( J, L ) TEMP2 = ALPHA*A( J, L ) DO 110, I = 1, J C( I, J ) = C( I, J ) + $ A( I, L )*TEMP1 + B( I, L )*TEMP2 110 CONTINUE END IF 120 CONTINUE 130 CONTINUE ELSE DO 180, J = 1, N IF( BETA.EQ.ZERO )THEN DO 140, I = J, N C( I, J ) = ZERO 140 CONTINUE ELSE IF( BETA.NE.ONE )THEN DO 150, I = J, N C( I, J ) = BETA*C( I, J ) 150 CONTINUE END IF DO 170, L = 1, K IF( ( A( J, L ).NE.ZERO ).OR. $ ( B( J, L ).NE.ZERO ) )THEN TEMP1 = ALPHA*B( J, L ) TEMP2 = ALPHA*A( J, L ) DO 160, I = J, N C( I, J ) = C( I, J ) + $ A( I, L )*TEMP1 + B( I, L )*TEMP2 160 CONTINUE END IF 170 CONTINUE 180 CONTINUE END IF ELSE * * Form C := alpha*A'*B + alpha*B'*A + C. * IF( UPPER )THEN DO 210, J = 1, N DO 200, I = 1, J TEMP1 = ZERO TEMP2 = ZERO DO 190, L = 1, K TEMP1 = TEMP1 + A( L, I )*B( L, J ) TEMP2 = TEMP2 + B( L, I )*A( L, J ) 190 CONTINUE IF( BETA.EQ.ZERO )THEN C( I, J ) = ALPHA*TEMP1 + ALPHA*TEMP2 ELSE C( I, J ) = BETA *C( I, J ) + $ ALPHA*TEMP1 + ALPHA*TEMP2 END IF 200 CONTINUE 210 CONTINUE ELSE DO 240, J = 1, N DO 230, I = J, N TEMP1 = ZERO TEMP2 = ZERO DO 220, L = 1, K TEMP1 = TEMP1 + A( L, I )*B( L, J ) TEMP2 = TEMP2 + B( L, I )*A( L, J ) 220 CONTINUE IF( BETA.EQ.ZERO )THEN C( I, J ) = ALPHA*TEMP1 + ALPHA*TEMP2 ELSE C( I, J ) = BETA *C( I, J ) + $ ALPHA*TEMP1 + ALPHA*TEMP2 END IF 230 CONTINUE 240 CONTINUE END IF END IF * RETURN * * End of DSYR2K. * END SUBROUTINE DSYRK ( UPLO, TRANS, N, K, ALPHA, A, LDA, $ BETA, C, LDC ) * .. Scalar Arguments .. CHARACTER*1 UPLO, TRANS INTEGER N, K, LDA, LDC DOUBLE PRECISION ALPHA, BETA * .. Array Arguments .. DOUBLE PRECISION A( LDA, * ), C( LDC, * ) * .. * * Purpose * ======= * * DSYRK performs one of the symmetric rank k operations * * C := alpha*A*A' + beta*C, * * or * * C := alpha*A'*A + beta*C, * * where alpha and beta are scalars, C is an n by n symmetric matrix * and A is an n by k matrix in the first case and a k by n matrix * in the second case. * * Parameters * ========== * * UPLO - CHARACTER*1. * On entry, UPLO specifies whether the upper or lower * triangular part of the array C is to be referenced as * follows: * * UPLO = 'U' or 'u' Only the upper triangular part of C * is to be referenced. * * UPLO = 'L' or 'l' Only the lower triangular part of C * is to be referenced. * * Unchanged on exit. * * TRANS - CHARACTER*1. * On entry, TRANS specifies the operation to be performed as * follows: * * TRANS = 'N' or 'n' C := alpha*A*A' + beta*C. * * TRANS = 'T' or 't' C := alpha*A'*A + beta*C. * * TRANS = 'C' or 'c' C := alpha*A'*A + beta*C. * * Unchanged on exit. * * N - INTEGER. * On entry, N specifies the order of the matrix C. N must be * at least zero. * Unchanged on exit. * * K - INTEGER. * On entry with TRANS = 'N' or 'n', K specifies the number * of columns of the matrix A, and on entry with * TRANS = 'T' or 't' or 'C' or 'c', K specifies the number * of rows of the matrix A. K must be at least zero. * Unchanged on exit. * * ALPHA - DOUBLE PRECISION. * On entry, ALPHA specifies the scalar alpha. * Unchanged on exit. * * A - DOUBLE PRECISION array of DIMENSION ( LDA, ka ), where ka is * k when TRANS = 'N' or 'n', and is n otherwise. * Before entry with TRANS = 'N' or 'n', the leading n by k * part of the array A must contain the matrix A, otherwise * the leading k by n part of the array A must contain the * matrix A. * Unchanged on exit. * * LDA - INTEGER. * On entry, LDA specifies the first dimension of A as declared * in the calling (sub) program. When TRANS = 'N' or 'n' * then LDA must be at least max( 1, n ), otherwise LDA must * be at least max( 1, k ). * Unchanged on exit. * * BETA - DOUBLE PRECISION. * On entry, BETA specifies the scalar beta. * Unchanged on exit. * * C - DOUBLE PRECISION array of DIMENSION ( LDC, n ). * Before entry with UPLO = 'U' or 'u', the leading n by n * upper triangular part of the array C must contain the upper * triangular part of the symmetric matrix and the strictly * lower triangular part of C is not referenced. On exit, the * upper triangular part of the array C is overwritten by the * upper triangular part of the updated matrix. * Before entry with UPLO = 'L' or 'l', the leading n by n * lower triangular part of the array C must contain the lower * triangular part of the symmetric matrix and the strictly * upper triangular part of C is not referenced. On exit, the * lower triangular part of the array C is overwritten by the * lower triangular part of the updated matrix. * * LDC - INTEGER. * On entry, LDC specifies the first dimension of C as declared * in the calling (sub) program. LDC must be at least * max( 1, n ). * Unchanged on exit. * * * Level 3 Blas routine. * * -- Written on 8-February-1989. * Jack Dongarra, Argonne National Laboratory. * Iain Duff, AERE Harwell. * Jeremy Du Croz, Numerical Algorithms Group Ltd. * Sven Hammarling, Numerical Algorithms Group Ltd. * * * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. External Subroutines .. EXTERNAL XERBLA * .. Intrinsic Functions .. INTRINSIC MAX * .. Local Scalars .. LOGICAL UPPER INTEGER I, INFO, J, L, NROWA DOUBLE PRECISION TEMP * .. Parameters .. DOUBLE PRECISION ONE , ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Executable Statements .. * * Test the input parameters. * IF( LSAME( TRANS, 'N' ) )THEN NROWA = N ELSE NROWA = K END IF UPPER = LSAME( UPLO, 'U' ) * INFO = 0 IF( ( .NOT.UPPER ).AND. $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN INFO = 1 ELSE IF( ( .NOT.LSAME( TRANS, 'N' ) ).AND. $ ( .NOT.LSAME( TRANS, 'T' ) ).AND. $ ( .NOT.LSAME( TRANS, 'C' ) ) )THEN INFO = 2 ELSE IF( N .LT.0 )THEN INFO = 3 ELSE IF( K .LT.0 )THEN INFO = 4 ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN INFO = 7 ELSE IF( LDC.LT.MAX( 1, N ) )THEN INFO = 10 END IF IF( INFO.NE.0 )THEN CALL XERBLA( 'DSYRK ', INFO ) RETURN END IF * * Quick return if possible. * IF( ( N.EQ.0 ).OR. $ ( ( ( ALPHA.EQ.ZERO ).OR.( K.EQ.0 ) ).AND.( BETA.EQ.ONE ) ) ) $ RETURN * * And when alpha.eq.zero. * IF( ALPHA.EQ.ZERO )THEN IF( UPPER )THEN IF( BETA.EQ.ZERO )THEN DO 20, J = 1, N DO 10, I = 1, J C( I, J ) = ZERO 10 CONTINUE 20 CONTINUE ELSE DO 40, J = 1, N DO 30, I = 1, J C( I, J ) = BETA*C( I, J ) 30 CONTINUE 40 CONTINUE END IF ELSE IF( BETA.EQ.ZERO )THEN DO 60, J = 1, N DO 50, I = J, N C( I, J ) = ZERO 50 CONTINUE 60 CONTINUE ELSE DO 80, J = 1, N DO 70, I = J, N C( I, J ) = BETA*C( I, J ) 70 CONTINUE 80 CONTINUE END IF END IF RETURN END IF * * Start the operations. * IF( LSAME( TRANS, 'N' ) )THEN * * Form C := alpha*A*A' + beta*C. * IF( UPPER )THEN DO 130, J = 1, N IF( BETA.EQ.ZERO )THEN DO 90, I = 1, J C( I, J ) = ZERO 90 CONTINUE ELSE IF( BETA.NE.ONE )THEN DO 100, I = 1, J C( I, J ) = BETA*C( I, J ) 100 CONTINUE END IF DO 120, L = 1, K IF( A( J, L ).NE.ZERO )THEN TEMP = ALPHA*A( J, L ) DO 110, I = 1, J C( I, J ) = C( I, J ) + TEMP*A( I, L ) 110 CONTINUE END IF 120 CONTINUE 130 CONTINUE ELSE DO 180, J = 1, N IF( BETA.EQ.ZERO )THEN DO 140, I = J, N C( I, J ) = ZERO 140 CONTINUE ELSE IF( BETA.NE.ONE )THEN DO 150, I = J, N C( I, J ) = BETA*C( I, J ) 150 CONTINUE END IF DO 170, L = 1, K IF( A( J, L ).NE.ZERO )THEN TEMP = ALPHA*A( J, L ) DO 160, I = J, N C( I, J ) = C( I, J ) + TEMP*A( I, L ) 160 CONTINUE END IF 170 CONTINUE 180 CONTINUE END IF ELSE * * Form C := alpha*A'*A + beta*C. * IF( UPPER )THEN DO 210, J = 1, N DO 200, I = 1, J TEMP = ZERO DO 190, L = 1, K TEMP = TEMP + A( L, I )*A( L, J ) 190 CONTINUE IF( BETA.EQ.ZERO )THEN C( I, J ) = ALPHA*TEMP ELSE C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) END IF 200 CONTINUE 210 CONTINUE ELSE DO 240, J = 1, N DO 230, I = J, N TEMP = ZERO DO 220, L = 1, K TEMP = TEMP + A( L, I )*A( L, J ) 220 CONTINUE IF( BETA.EQ.ZERO )THEN C( I, J ) = ALPHA*TEMP ELSE C( I, J ) = ALPHA*TEMP + BETA*C( I, J ) END IF 230 CONTINUE 240 CONTINUE END IF END IF * RETURN * * End of DSYRK . * END SUBROUTINE DTRMM ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, $ B, LDB ) * .. Scalar Arguments .. CHARACTER*1 SIDE, UPLO, TRANSA, DIAG INTEGER M, N, LDA, LDB DOUBLE PRECISION ALPHA * .. Array Arguments .. DOUBLE PRECISION A( LDA, * ), B( LDB, * ) * .. * * Purpose * ======= * * DTRMM performs one of the matrix-matrix operations * * B := alpha*op( A )*B, or B := alpha*B*op( A ), * * where alpha is a scalar, B is an m by n matrix, A is a unit, or * non-unit, upper or lower triangular matrix and op( A ) is one of * * op( A ) = A or op( A ) = A'. * * Parameters * ========== * * SIDE - CHARACTER*1. * On entry, SIDE specifies whether op( A ) multiplies B from * the left or right as follows: * * SIDE = 'L' or 'l' B := alpha*op( A )*B. * * SIDE = 'R' or 'r' B := alpha*B*op( A ). * * Unchanged on exit. * * UPLO - CHARACTER*1. * On entry, UPLO specifies whether the matrix A is an upper or * lower triangular matrix as follows: * * UPLO = 'U' or 'u' A is an upper triangular matrix. * * UPLO = 'L' or 'l' A is a lower triangular matrix. * * Unchanged on exit. * * TRANSA - CHARACTER*1. * On entry, TRANSA specifies the form of op( A ) to be used in * the matrix multiplication as follows: * * TRANSA = 'N' or 'n' op( A ) = A. * * TRANSA = 'T' or 't' op( A ) = A'. * * TRANSA = 'C' or 'c' op( A ) = A'. * * Unchanged on exit. * * DIAG - CHARACTER*1. * On entry, DIAG specifies whether or not A is unit triangular * as follows: * * DIAG = 'U' or 'u' A is assumed to be unit triangular. * * DIAG = 'N' or 'n' A is not assumed to be unit * triangular. * * Unchanged on exit. * * M - INTEGER. * On entry, M specifies the number of rows of B. M must be at * least zero. * Unchanged on exit. * * N - INTEGER. * On entry, N specifies the number of columns of B. N must be * at least zero. * Unchanged on exit. * * ALPHA - DOUBLE PRECISION. * On entry, ALPHA specifies the scalar alpha. When alpha is * zero then A is not referenced and B need not be set before * entry. * Unchanged on exit. * * A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m * when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. * Before entry with UPLO = 'U' or 'u', the leading k by k * upper triangular part of the array A must contain the upper * triangular matrix and the strictly lower triangular part of * A is not referenced. * Before entry with UPLO = 'L' or 'l', the leading k by k * lower triangular part of the array A must contain the lower * triangular matrix and the strictly upper triangular part of * A is not referenced. * Note that when DIAG = 'U' or 'u', the diagonal elements of * A are not referenced either, but are assumed to be unity. * Unchanged on exit. * * LDA - INTEGER. * On entry, LDA specifies the first dimension of A as declared * in the calling (sub) program. When SIDE = 'L' or 'l' then * LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' * then LDA must be at least max( 1, n ). * Unchanged on exit. * * B - DOUBLE PRECISION array of DIMENSION ( LDB, n ). * Before entry, the leading m by n part of the array B must * contain the matrix B, and on exit is overwritten by the * transformed matrix. * * LDB - INTEGER. * On entry, LDB specifies the first dimension of B as declared * in the calling (sub) program. LDB must be at least * max( 1, m ). * Unchanged on exit. * * * Level 3 Blas routine. * * -- Written on 8-February-1989. * Jack Dongarra, Argonne National Laboratory. * Iain Duff, AERE Harwell. * Jeremy Du Croz, Numerical Algorithms Group Ltd. * Sven Hammarling, Numerical Algorithms Group Ltd. * * * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. External Subroutines .. EXTERNAL XERBLA * .. Intrinsic Functions .. INTRINSIC MAX * .. Local Scalars .. LOGICAL LSIDE, NOUNIT, UPPER INTEGER I, INFO, J, K, NROWA DOUBLE PRECISION TEMP * .. Parameters .. DOUBLE PRECISION ONE , ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Executable Statements .. * * Test the input parameters. * LSIDE = LSAME( SIDE , 'L' ) IF( LSIDE )THEN NROWA = M ELSE NROWA = N END IF NOUNIT = LSAME( DIAG , 'N' ) UPPER = LSAME( UPLO , 'U' ) * INFO = 0 IF( ( .NOT.LSIDE ).AND. $ ( .NOT.LSAME( SIDE , 'R' ) ) )THEN INFO = 1 ELSE IF( ( .NOT.UPPER ).AND. $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN INFO = 2 ELSE IF( ( .NOT.LSAME( TRANSA, 'N' ) ).AND. $ ( .NOT.LSAME( TRANSA, 'T' ) ).AND. $ ( .NOT.LSAME( TRANSA, 'C' ) ) )THEN INFO = 3 ELSE IF( ( .NOT.LSAME( DIAG , 'U' ) ).AND. $ ( .NOT.LSAME( DIAG , 'N' ) ) )THEN INFO = 4 ELSE IF( M .LT.0 )THEN INFO = 5 ELSE IF( N .LT.0 )THEN INFO = 6 ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN INFO = 9 ELSE IF( LDB.LT.MAX( 1, M ) )THEN INFO = 11 END IF IF( INFO.NE.0 )THEN CALL XERBLA( 'DTRMM ', INFO ) RETURN END IF * * Quick return if possible. * IF( N.EQ.0 ) $ RETURN * * And when alpha.eq.zero. * IF( ALPHA.EQ.ZERO )THEN DO 20, J = 1, N DO 10, I = 1, M B( I, J ) = ZERO 10 CONTINUE 20 CONTINUE RETURN END IF * * Start the operations. * IF( LSIDE )THEN IF( LSAME( TRANSA, 'N' ) )THEN * * Form B := alpha*A*B. * IF( UPPER )THEN DO 50, J = 1, N DO 40, K = 1, M IF( B( K, J ).NE.ZERO )THEN TEMP = ALPHA*B( K, J ) DO 30, I = 1, K - 1 B( I, J ) = B( I, J ) + TEMP*A( I, K ) 30 CONTINUE IF( NOUNIT ) $ TEMP = TEMP*A( K, K ) B( K, J ) = TEMP END IF 40 CONTINUE 50 CONTINUE ELSE DO 80, J = 1, N DO 70 K = M, 1, -1 IF( B( K, J ).NE.ZERO )THEN TEMP = ALPHA*B( K, J ) B( K, J ) = TEMP IF( NOUNIT ) $ B( K, J ) = B( K, J )*A( K, K ) DO 60, I = K + 1, M B( I, J ) = B( I, J ) + TEMP*A( I, K ) 60 CONTINUE END IF 70 CONTINUE 80 CONTINUE END IF ELSE * * Form B := alpha*A'*B. * IF( UPPER )THEN DO 110, J = 1, N DO 100, I = M, 1, -1 TEMP = B( I, J ) IF( NOUNIT ) $ TEMP = TEMP*A( I, I ) DO 90, K = 1, I - 1 TEMP = TEMP + A( K, I )*B( K, J ) 90 CONTINUE B( I, J ) = ALPHA*TEMP 100 CONTINUE 110 CONTINUE ELSE DO 140, J = 1, N DO 130, I = 1, M TEMP = B( I, J ) IF( NOUNIT ) $ TEMP = TEMP*A( I, I ) DO 120, K = I + 1, M TEMP = TEMP + A( K, I )*B( K, J ) 120 CONTINUE B( I, J ) = ALPHA*TEMP 130 CONTINUE 140 CONTINUE END IF END IF ELSE IF( LSAME( TRANSA, 'N' ) )THEN * * Form B := alpha*B*A. * IF( UPPER )THEN DO 180, J = N, 1, -1 TEMP = ALPHA IF( NOUNIT ) $ TEMP = TEMP*A( J, J ) DO 150, I = 1, M B( I, J ) = TEMP*B( I, J ) 150 CONTINUE DO 170, K = 1, J - 1 IF( A( K, J ).NE.ZERO )THEN TEMP = ALPHA*A( K, J ) DO 160, I = 1, M B( I, J ) = B( I, J ) + TEMP*B( I, K ) 160 CONTINUE END IF 170 CONTINUE 180 CONTINUE ELSE DO 220, J = 1, N TEMP = ALPHA IF( NOUNIT ) $ TEMP = TEMP*A( J, J ) DO 190, I = 1, M B( I, J ) = TEMP*B( I, J ) 190 CONTINUE DO 210, K = J + 1, N IF( A( K, J ).NE.ZERO )THEN TEMP = ALPHA*A( K, J ) DO 200, I = 1, M B( I, J ) = B( I, J ) + TEMP*B( I, K ) 200 CONTINUE END IF 210 CONTINUE 220 CONTINUE END IF ELSE * * Form B := alpha*B*A'. * IF( UPPER )THEN DO 260, K = 1, N DO 240, J = 1, K - 1 IF( A( J, K ).NE.ZERO )THEN TEMP = ALPHA*A( J, K ) DO 230, I = 1, M B( I, J ) = B( I, J ) + TEMP*B( I, K ) 230 CONTINUE END IF 240 CONTINUE TEMP = ALPHA IF( NOUNIT ) $ TEMP = TEMP*A( K, K ) IF( TEMP.NE.ONE )THEN DO 250, I = 1, M B( I, K ) = TEMP*B( I, K ) 250 CONTINUE END IF 260 CONTINUE ELSE DO 300, K = N, 1, -1 DO 280, J = K + 1, N IF( A( J, K ).NE.ZERO )THEN TEMP = ALPHA*A( J, K ) DO 270, I = 1, M B( I, J ) = B( I, J ) + TEMP*B( I, K ) 270 CONTINUE END IF 280 CONTINUE TEMP = ALPHA IF( NOUNIT ) $ TEMP = TEMP*A( K, K ) IF( TEMP.NE.ONE )THEN DO 290, I = 1, M B( I, K ) = TEMP*B( I, K ) 290 CONTINUE END IF 300 CONTINUE END IF END IF END IF * RETURN * * End of DTRMM . * END SUBROUTINE DTRSM ( SIDE, UPLO, TRANSA, DIAG, M, N, ALPHA, A, LDA, $ B, LDB ) * .. Scalar Arguments .. CHARACTER*1 SIDE, UPLO, TRANSA, DIAG INTEGER M, N, LDA, LDB DOUBLE PRECISION ALPHA * .. Array Arguments .. DOUBLE PRECISION A( LDA, * ), B( LDB, * ) * .. * * Purpose * ======= * * DTRSM solves one of the matrix equations * * op( A )*X = alpha*B, or X*op( A ) = alpha*B, * * where alpha is a scalar, X and B are m by n matrices, A is a unit, or * non-unit, upper or lower triangular matrix and op( A ) is one of * * op( A ) = A or op( A ) = A'. * * The matrix X is overwritten on B. * * Parameters * ========== * * SIDE - CHARACTER*1. * On entry, SIDE specifies whether op( A ) appears on the left * or right of X as follows: * * SIDE = 'L' or 'l' op( A )*X = alpha*B. * * SIDE = 'R' or 'r' X*op( A ) = alpha*B. * * Unchanged on exit. * * UPLO - CHARACTER*1. * On entry, UPLO specifies whether the matrix A is an upper or * lower triangular matrix as follows: * * UPLO = 'U' or 'u' A is an upper triangular matrix. * * UPLO = 'L' or 'l' A is a lower triangular matrix. * * Unchanged on exit. * * TRANSA - CHARACTER*1. * On entry, TRANSA specifies the form of op( A ) to be used in * the matrix multiplication as follows: * * TRANSA = 'N' or 'n' op( A ) = A. * * TRANSA = 'T' or 't' op( A ) = A'. * * TRANSA = 'C' or 'c' op( A ) = A'. * * Unchanged on exit. * * DIAG - CHARACTER*1. * On entry, DIAG specifies whether or not A is unit triangular * as follows: * * DIAG = 'U' or 'u' A is assumed to be unit triangular. * * DIAG = 'N' or 'n' A is not assumed to be unit * triangular. * * Unchanged on exit. * * M - INTEGER. * On entry, M specifies the number of rows of B. M must be at * least zero. * Unchanged on exit. * * N - INTEGER. * On entry, N specifies the number of columns of B. N must be * at least zero. * Unchanged on exit. * * ALPHA - DOUBLE PRECISION. * On entry, ALPHA specifies the scalar alpha. When alpha is * zero then A is not referenced and B need not be set before * entry. * Unchanged on exit. * * A - DOUBLE PRECISION array of DIMENSION ( LDA, k ), where k is m * when SIDE = 'L' or 'l' and is n when SIDE = 'R' or 'r'. * Before entry with UPLO = 'U' or 'u', the leading k by k * upper triangular part of the array A must contain the upper * triangular matrix and the strictly lower triangular part of * A is not referenced. * Before entry with UPLO = 'L' or 'l', the leading k by k * lower triangular part of the array A must contain the lower * triangular matrix and the strictly upper triangular part of * A is not referenced. * Note that when DIAG = 'U' or 'u', the diagonal elements of * A are not referenced either, but are assumed to be unity. * Unchanged on exit. * * LDA - INTEGER. * On entry, LDA specifies the first dimension of A as declared * in the calling (sub) program. When SIDE = 'L' or 'l' then * LDA must be at least max( 1, m ), when SIDE = 'R' or 'r' * then LDA must be at least max( 1, n ). * Unchanged on exit. * * B - DOUBLE PRECISION array of DIMENSION ( LDB, n ). * Before entry, the leading m by n part of the array B must * contain the right-hand side matrix B, and on exit is * overwritten by the solution matrix X. * * LDB - INTEGER. * On entry, LDB specifies the first dimension of B as declared * in the calling (sub) program. LDB must be at least * max( 1, m ). * Unchanged on exit. * * * Level 3 Blas routine. * * * -- Written on 8-February-1989. * Jack Dongarra, Argonne National Laboratory. * Iain Duff, AERE Harwell. * Jeremy Du Croz, Numerical Algorithms Group Ltd. * Sven Hammarling, Numerical Algorithms Group Ltd. * * * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. External Subroutines .. EXTERNAL XERBLA * .. Intrinsic Functions .. INTRINSIC MAX * .. Local Scalars .. LOGICAL LSIDE, NOUNIT, UPPER INTEGER I, INFO, J, K, NROWA DOUBLE PRECISION TEMP * .. Parameters .. DOUBLE PRECISION ONE , ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Executable Statements .. * * Test the input parameters. * LSIDE = LSAME( SIDE , 'L' ) IF( LSIDE )THEN NROWA = M ELSE NROWA = N END IF NOUNIT = LSAME( DIAG , 'N' ) UPPER = LSAME( UPLO , 'U' ) * INFO = 0 IF( ( .NOT.LSIDE ).AND. $ ( .NOT.LSAME( SIDE , 'R' ) ) )THEN INFO = 1 ELSE IF( ( .NOT.UPPER ).AND. $ ( .NOT.LSAME( UPLO , 'L' ) ) )THEN INFO = 2 ELSE IF( ( .NOT.LSAME( TRANSA, 'N' ) ).AND. $ ( .NOT.LSAME( TRANSA, 'T' ) ).AND. $ ( .NOT.LSAME( TRANSA, 'C' ) ) )THEN INFO = 3 ELSE IF( ( .NOT.LSAME( DIAG , 'U' ) ).AND. $ ( .NOT.LSAME( DIAG , 'N' ) ) )THEN INFO = 4 ELSE IF( M .LT.0 )THEN INFO = 5 ELSE IF( N .LT.0 )THEN INFO = 6 ELSE IF( LDA.LT.MAX( 1, NROWA ) )THEN INFO = 9 ELSE IF( LDB.LT.MAX( 1, M ) )THEN INFO = 11 END IF IF( INFO.NE.0 )THEN CALL XERBLA( 'DTRSM ', INFO ) RETURN END IF * * Quick return if possible. * IF( N.EQ.0 ) $ RETURN * * And when alpha.eq.zero. * IF( ALPHA.EQ.ZERO )THEN DO 20, J = 1, N DO 10, I = 1, M B( I, J ) = ZERO 10 CONTINUE 20 CONTINUE RETURN END IF * * Start the operations. * IF( LSIDE )THEN IF( LSAME( TRANSA, 'N' ) )THEN * * Form B := alpha*inv( A )*B. * IF( UPPER )THEN DO 60, J = 1, N IF( ALPHA.NE.ONE )THEN DO 30, I = 1, M B( I, J ) = ALPHA*B( I, J ) 30 CONTINUE END IF DO 50, K = M, 1, -1 IF( B( K, J ).NE.ZERO )THEN IF( NOUNIT ) $ B( K, J ) = B( K, J )/A( K, K ) DO 40, I = 1, K - 1 B( I, J ) = B( I, J ) - B( K, J )*A( I, K ) 40 CONTINUE END IF 50 CONTINUE 60 CONTINUE ELSE DO 100, J = 1, N IF( ALPHA.NE.ONE )THEN DO 70, I = 1, M B( I, J ) = ALPHA*B( I, J ) 70 CONTINUE END IF DO 90 K = 1, M IF( B( K, J ).NE.ZERO )THEN IF( NOUNIT ) $ B( K, J ) = B( K, J )/A( K, K ) DO 80, I = K + 1, M B( I, J ) = B( I, J ) - B( K, J )*A( I, K ) 80 CONTINUE END IF 90 CONTINUE 100 CONTINUE END IF ELSE * * Form B := alpha*inv( A' )*B. * IF( UPPER )THEN DO 130, J = 1, N DO 120, I = 1, M TEMP = ALPHA*B( I, J ) DO 110, K = 1, I - 1 TEMP = TEMP - A( K, I )*B( K, J ) 110 CONTINUE IF( NOUNIT ) $ TEMP = TEMP/A( I, I ) B( I, J ) = TEMP 120 CONTINUE 130 CONTINUE ELSE DO 160, J = 1, N DO 150, I = M, 1, -1 TEMP = ALPHA*B( I, J ) DO 140, K = I + 1, M TEMP = TEMP - A( K, I )*B( K, J ) 140 CONTINUE IF( NOUNIT ) $ TEMP = TEMP/A( I, I ) B( I, J ) = TEMP 150 CONTINUE 160 CONTINUE END IF END IF ELSE IF( LSAME( TRANSA, 'N' ) )THEN * * Form B := alpha*B*inv( A ). * IF( UPPER )THEN DO 210, J = 1, N IF( ALPHA.NE.ONE )THEN DO 170, I = 1, M B( I, J ) = ALPHA*B( I, J ) 170 CONTINUE END IF DO 190, K = 1, J - 1 IF( A( K, J ).NE.ZERO )THEN DO 180, I = 1, M B( I, J ) = B( I, J ) - A( K, J )*B( I, K ) 180 CONTINUE END IF 190 CONTINUE IF( NOUNIT )THEN TEMP = ONE/A( J, J ) DO 200, I = 1, M B( I, J ) = TEMP*B( I, J ) 200 CONTINUE END IF 210 CONTINUE ELSE DO 260, J = N, 1, -1 IF( ALPHA.NE.ONE )THEN DO 220, I = 1, M B( I, J ) = ALPHA*B( I, J ) 220 CONTINUE END IF DO 240, K = J + 1, N IF( A( K, J ).NE.ZERO )THEN DO 230, I = 1, M B( I, J ) = B( I, J ) - A( K, J )*B( I, K ) 230 CONTINUE END IF 240 CONTINUE IF( NOUNIT )THEN TEMP = ONE/A( J, J ) DO 250, I = 1, M B( I, J ) = TEMP*B( I, J ) 250 CONTINUE END IF 260 CONTINUE END IF ELSE * * Form B := alpha*B*inv( A' ). * IF( UPPER )THEN DO 310, K = N, 1, -1 IF( NOUNIT )THEN TEMP = ONE/A( K, K ) DO 270, I = 1, M B( I, K ) = TEMP*B( I, K ) 270 CONTINUE END IF DO 290, J = 1, K - 1 IF( A( J, K ).NE.ZERO )THEN TEMP = A( J, K ) DO 280, I = 1, M B( I, J ) = B( I, J ) - TEMP*B( I, K ) 280 CONTINUE END IF 290 CONTINUE IF( ALPHA.NE.ONE )THEN DO 300, I = 1, M B( I, K ) = ALPHA*B( I, K ) 300 CONTINUE END IF 310 CONTINUE ELSE DO 360, K = 1, N IF( NOUNIT )THEN TEMP = ONE/A( K, K ) DO 320, I = 1, M B( I, K ) = TEMP*B( I, K ) 320 CONTINUE END IF DO 340, J = K + 1, N IF( A( J, K ).NE.ZERO )THEN TEMP = A( J, K ) DO 330, I = 1, M B( I, J ) = B( I, J ) - TEMP*B( I, K ) 330 CONTINUE END IF 340 CONTINUE IF( ALPHA.NE.ONE )THEN DO 350, I = 1, M B( I, K ) = ALPHA*B( I, K ) 350 CONTINUE END IF 360 CONTINUE END IF END IF END IF * RETURN * * End of DTRSM . * END SUBROUTINE DGEMV ( TRANS, M, N, ALPHA, A, LDA, X, INCX, $ BETA, Y, INCY ) * .. Scalar Arguments .. DOUBLE PRECISION ALPHA, BETA INTEGER INCX, INCY, LDA, M, N CHARACTER*1 TRANS * .. Array Arguments .. DOUBLE PRECISION A( LDA, * ), X( * ), Y( * ) * .. * * Purpose * ======= * * DGEMV performs one of the matrix-vector operations * * y := alpha*A*x + beta*y, or y := alpha*A'*x + beta*y, * * where alpha and beta are scalars, x and y are vectors and A is an * m by n matrix. * * Parameters * ========== * * TRANS - CHARACTER*1. * On entry, TRANS specifies the operation to be performed as * follows: * * TRANS = 'N' or 'n' y := alpha*A*x + beta*y. * * TRANS = 'T' or 't' y := alpha*A'*x + beta*y. * * TRANS = 'C' or 'c' y := alpha*A'*x + beta*y. * * Unchanged on exit. * * M - INTEGER. * On entry, M specifies the number of rows of the matrix A. * M must be at least zero. * Unchanged on exit. * * N - INTEGER. * On entry, N specifies the number of columns of the matrix A. * N must be at least zero. * Unchanged on exit. * * ALPHA - DOUBLE PRECISION. * On entry, ALPHA specifies the scalar alpha. * Unchanged on exit. * * A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). * Before entry, the leading m by n part of the array A must * contain the matrix of coefficients. * Unchanged on exit. * * LDA - INTEGER. * On entry, LDA specifies the first dimension of A as declared * in the calling (sub) program. LDA must be at least * max( 1, m ). * Unchanged on exit. * * X - DOUBLE PRECISION array of DIMENSION at least * ( 1 + ( n - 1 )*abs( INCX ) ) when TRANS = 'N' or 'n' * and at least * ( 1 + ( m - 1 )*abs( INCX ) ) otherwise. * Before entry, the incremented array X must contain the * vector x. * Unchanged on exit. * * INCX - INTEGER. * On entry, INCX specifies the increment for the elements of * X. INCX must not be zero. * Unchanged on exit. * * BETA - DOUBLE PRECISION. * On entry, BETA specifies the scalar beta. When BETA is * supplied as zero then Y need not be set on input. * Unchanged on exit. * * Y - DOUBLE PRECISION array of DIMENSION at least * ( 1 + ( m - 1 )*abs( INCY ) ) when TRANS = 'N' or 'n' * and at least * ( 1 + ( n - 1 )*abs( INCY ) ) otherwise. * Before entry with BETA non-zero, the incremented array Y * must contain the vector y. On exit, Y is overwritten by the * updated vector y. * * INCY - INTEGER. * On entry, INCY specifies the increment for the elements of * Y. INCY must not be zero. * Unchanged on exit. * * * Level 2 Blas routine. * * -- Written on 22-October-1986. * Jack Dongarra, Argonne National Lab. * Jeremy Du Croz, Nag Central Office. * Sven Hammarling, Nag Central Office. * Richard Hanson, Sandia National Labs. * * * .. Parameters .. DOUBLE PRECISION ONE , ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. Local Scalars .. DOUBLE PRECISION TEMP INTEGER I, INFO, IX, IY, J, JX, JY, KX, KY, LENX, LENY * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. External Subroutines .. EXTERNAL XERBLA * .. Intrinsic Functions .. INTRINSIC MAX * .. * .. Executable Statements .. * * Test the input parameters. * INFO = 0 IF ( .NOT.LSAME( TRANS, 'N' ).AND. $ .NOT.LSAME( TRANS, 'T' ).AND. $ .NOT.LSAME( TRANS, 'C' ) )THEN INFO = 1 ELSE IF( M.LT.0 )THEN INFO = 2 ELSE IF( N.LT.0 )THEN INFO = 3 ELSE IF( LDA.LT.MAX( 1, M ) )THEN INFO = 6 ELSE IF( INCX.EQ.0 )THEN INFO = 8 ELSE IF( INCY.EQ.0 )THEN INFO = 11 END IF IF( INFO.NE.0 )THEN CALL XERBLA( 'DGEMV ', INFO ) RETURN END IF * * Quick return if possible. * IF( ( M.EQ.0 ).OR.( N.EQ.0 ).OR. $ ( ( ALPHA.EQ.ZERO ).AND.( BETA.EQ.ONE ) ) ) $ RETURN * * Set LENX and LENY, the lengths of the vectors x and y, and set * up the start points in X and Y. * IF( LSAME( TRANS, 'N' ) )THEN LENX = N LENY = M ELSE LENX = M LENY = N END IF IF( INCX.GT.0 )THEN KX = 1 ELSE KX = 1 - ( LENX - 1 )*INCX END IF IF( INCY.GT.0 )THEN KY = 1 ELSE KY = 1 - ( LENY - 1 )*INCY END IF * * Start the operations. In this version the elements of A are * accessed sequentially with one pass through A. * * First form y := beta*y. * IF( BETA.NE.ONE )THEN IF( INCY.EQ.1 )THEN IF( BETA.EQ.ZERO )THEN DO 10, I = 1, LENY Y( I ) = ZERO 10 CONTINUE ELSE DO 20, I = 1, LENY Y( I ) = BETA*Y( I ) 20 CONTINUE END IF ELSE IY = KY IF( BETA.EQ.ZERO )THEN DO 30, I = 1, LENY Y( IY ) = ZERO IY = IY + INCY 30 CONTINUE ELSE DO 40, I = 1, LENY Y( IY ) = BETA*Y( IY ) IY = IY + INCY 40 CONTINUE END IF END IF END IF IF( ALPHA.EQ.ZERO ) $ RETURN IF( LSAME( TRANS, 'N' ) )THEN * * Form y := alpha*A*x + y. * JX = KX IF( INCY.EQ.1 )THEN DO 60, J = 1, N IF( X( JX ).NE.ZERO )THEN TEMP = ALPHA*X( JX ) DO 50, I = 1, M Y( I ) = Y( I ) + TEMP*A( I, J ) 50 CONTINUE END IF JX = JX + INCX 60 CONTINUE ELSE DO 80, J = 1, N IF( X( JX ).NE.ZERO )THEN TEMP = ALPHA*X( JX ) IY = KY DO 70, I = 1, M Y( IY ) = Y( IY ) + TEMP*A( I, J ) IY = IY + INCY 70 CONTINUE END IF JX = JX + INCX 80 CONTINUE END IF ELSE * * Form y := alpha*A'*x + y. * JY = KY IF( INCX.EQ.1 )THEN DO 100, J = 1, N TEMP = ZERO DO 90, I = 1, M TEMP = TEMP + A( I, J )*X( I ) 90 CONTINUE Y( JY ) = Y( JY ) + ALPHA*TEMP JY = JY + INCY 100 CONTINUE ELSE DO 120, J = 1, N TEMP = ZERO IX = KX DO 110, I = 1, M TEMP = TEMP + A( I, J )*X( IX ) IX = IX + INCX 110 CONTINUE Y( JY ) = Y( JY ) + ALPHA*TEMP JY = JY + INCY 120 CONTINUE END IF END IF * RETURN * * End of DGEMV . * END SUBROUTINE DSYR ( UPLO, N, ALPHA, X, INCX, A, LDA ) * .. Scalar Arguments .. DOUBLE PRECISION ALPHA INTEGER INCX, LDA, N CHARACTER*1 UPLO * .. Array Arguments .. DOUBLE PRECISION A( LDA, * ), X( * ) * .. * * Purpose * ======= * * DSYR performs the symmetric rank 1 operation * * A := alpha*x*x' + A, * * where alpha is a real scalar, x is an n element vector and A is an * n by n symmetric matrix. * * Parameters * ========== * * UPLO - CHARACTER*1. * On entry, UPLO specifies whether the upper or lower * triangular part of the array A is to be referenced as * follows: * * UPLO = 'U' or 'u' Only the upper triangular part of A * is to be referenced. * * UPLO = 'L' or 'l' Only the lower triangular part of A * is to be referenced. * * Unchanged on exit. * * N - INTEGER. * On entry, N specifies the order of the matrix A. * N must be at least zero. * Unchanged on exit. * * ALPHA - DOUBLE PRECISION. * On entry, ALPHA specifies the scalar alpha. * Unchanged on exit. * * X - DOUBLE PRECISION array of dimension at least * ( 1 + ( n - 1 )*abs( INCX ) ). * Before entry, the incremented array X must contain the n * element vector x. * Unchanged on exit. * * INCX - INTEGER. * On entry, INCX specifies the increment for the elements of * X. INCX must not be zero. * Unchanged on exit. * * A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). * Before entry with UPLO = 'U' or 'u', the leading n by n * upper triangular part of the array A must contain the upper * triangular part of the symmetric matrix and the strictly * lower triangular part of A is not referenced. On exit, the * upper triangular part of the array A is overwritten by the * upper triangular part of the updated matrix. * Before entry with UPLO = 'L' or 'l', the leading n by n * lower triangular part of the array A must contain the lower * triangular part of the symmetric matrix and the strictly * upper triangular part of A is not referenced. On exit, the * lower triangular part of the array A is overwritten by the * lower triangular part of the updated matrix. * * LDA - INTEGER. * On entry, LDA specifies the first dimension of A as declared * in the calling (sub) program. LDA must be at least * max( 1, n ). * Unchanged on exit. * * * Level 2 Blas routine. * * -- Written on 22-October-1986. * Jack Dongarra, Argonne National Lab. * Jeremy Du Croz, Nag Central Office. * Sven Hammarling, Nag Central Office. * Richard Hanson, Sandia National Labs. * * * .. Parameters .. DOUBLE PRECISION ZERO PARAMETER ( ZERO = 0.0D+0 ) * .. Local Scalars .. DOUBLE PRECISION TEMP INTEGER I, INFO, IX, J, JX, KX * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. External Subroutines .. EXTERNAL XERBLA * .. Intrinsic Functions .. INTRINSIC MAX * .. * .. Executable Statements .. * * Test the input parameters. * INFO = 0 IF ( .NOT.LSAME( UPLO, 'U' ).AND. $ .NOT.LSAME( UPLO, 'L' ) )THEN INFO = 1 ELSE IF( N.LT.0 )THEN INFO = 2 ELSE IF( INCX.EQ.0 )THEN INFO = 5 ELSE IF( LDA.LT.MAX( 1, N ) )THEN INFO = 7 END IF IF( INFO.NE.0 )THEN CALL XERBLA( 'DSYR ', INFO ) RETURN END IF * * Quick return if possible. * IF( ( N.EQ.0 ).OR.( ALPHA.EQ.ZERO ) ) $ RETURN * * Set the start point in X if the increment is not unity. * IF( INCX.LE.0 )THEN KX = 1 - ( N - 1 )*INCX ELSE IF( INCX.NE.1 )THEN KX = 1 END IF * * Start the operations. In this version the elements of A are * accessed sequentially with one pass through the triangular part * of A. * IF( LSAME( UPLO, 'U' ) )THEN * * Form A when A is stored in upper triangle. * IF( INCX.EQ.1 )THEN DO 20, J = 1, N IF( X( J ).NE.ZERO )THEN TEMP = ALPHA*X( J ) DO 10, I = 1, J A( I, J ) = A( I, J ) + X( I )*TEMP 10 CONTINUE END IF 20 CONTINUE ELSE JX = KX DO 40, J = 1, N IF( X( JX ).NE.ZERO )THEN TEMP = ALPHA*X( JX ) IX = KX DO 30, I = 1, J A( I, J ) = A( I, J ) + X( IX )*TEMP IX = IX + INCX 30 CONTINUE END IF JX = JX + INCX 40 CONTINUE END IF ELSE * * Form A when A is stored in lower triangle. * IF( INCX.EQ.1 )THEN DO 60, J = 1, N IF( X( J ).NE.ZERO )THEN TEMP = ALPHA*X( J ) DO 50, I = J, N A( I, J ) = A( I, J ) + X( I )*TEMP 50 CONTINUE END IF 60 CONTINUE ELSE JX = KX DO 80, J = 1, N IF( X( JX ).NE.ZERO )THEN TEMP = ALPHA*X( JX ) IX = JX DO 70, I = J, N A( I, J ) = A( I, J ) + X( IX )*TEMP IX = IX + INCX 70 CONTINUE END IF JX = JX + INCX 80 CONTINUE END IF END IF * RETURN * * End of DSYR . * END SUBROUTINE DTBSV ( UPLO, TRANS, DIAG, N, K, A, LDA, X, INCX ) * .. Scalar Arguments .. INTEGER INCX, K, LDA, N CHARACTER*1 DIAG, TRANS, UPLO * .. Array Arguments .. DOUBLE PRECISION A( LDA, * ), X( * ) * .. * * Purpose * ======= * * DTBSV solves one of the systems of equations * * A*x = b, or A'*x = b, * * where b and x are n element vectors and A is an n by n unit, or * non-unit, upper or lower triangular band matrix, with ( k + 1 ) * diagonals. * * No test for singularity or near-singularity is included in this * routine. Such tests must be performed before calling this routine. * * Parameters * ========== * * UPLO - CHARACTER*1. * On entry, UPLO specifies whether the matrix is an upper or * lower triangular matrix as follows: * * UPLO = 'U' or 'u' A is an upper triangular matrix. * * UPLO = 'L' or 'l' A is a lower triangular matrix. * * Unchanged on exit. * * TRANS - CHARACTER*1. * On entry, TRANS specifies the equations to be solved as * follows: * * TRANS = 'N' or 'n' A*x = b. * * TRANS = 'T' or 't' A'*x = b. * * TRANS = 'C' or 'c' A'*x = b. * * Unchanged on exit. * * DIAG - CHARACTER*1. * On entry, DIAG specifies whether or not A is unit * triangular as follows: * * DIAG = 'U' or 'u' A is assumed to be unit triangular. * * DIAG = 'N' or 'n' A is not assumed to be unit * triangular. * * Unchanged on exit. * * N - INTEGER. * On entry, N specifies the order of the matrix A. * N must be at least zero. * Unchanged on exit. * * K - INTEGER. * On entry with UPLO = 'U' or 'u', K specifies the number of * super-diagonals of the matrix A. * On entry with UPLO = 'L' or 'l', K specifies the number of * sub-diagonals of the matrix A. * K must satisfy 0 .le. K. * Unchanged on exit. * * A - DOUBLE PRECISION array of DIMENSION ( LDA, n ). * Before entry with UPLO = 'U' or 'u', the leading ( k + 1 ) * by n part of the array A must contain the upper triangular * band part of the matrix of coefficients, supplied column by * column, with the leading diagonal of the matrix in row * ( k + 1 ) of the array, the first super-diagonal starting at * position 2 in row k, and so on. The top left k by k triangle * of the array A is not referenced. * The following program segment will transfer an upper * triangular band matrix from conventional full matrix storage * to band storage: * * DO 20, J = 1, N * M = K + 1 - J * DO 10, I = MAX( 1, J - K ), J * A( M + I, J ) = matrix( I, J ) * 10 CONTINUE * 20 CONTINUE * * Before entry with UPLO = 'L' or 'l', the leading ( k + 1 ) * by n part of the array A must contain the lower triangular * band part of the matrix of coefficients, supplied column by * column, with the leading diagonal of the matrix in row 1 of * the array, the first sub-diagonal starting at position 1 in * row 2, and so on. The bottom right k by k triangle of the * array A is not referenced. * The following program segment will transfer a lower * triangular band matrix from conventional full matrix storage * to band storage: * * DO 20, J = 1, N * M = 1 - J * DO 10, I = J, MIN( N, J + K ) * A( M + I, J ) = matrix( I, J ) * 10 CONTINUE * 20 CONTINUE * * Note that when DIAG = 'U' or 'u' the elements of the array A * corresponding to the diagonal elements of the matrix are not * referenced, but are assumed to be unity. * Unchanged on exit. * * LDA - INTEGER. * On entry, LDA specifies the first dimension of A as declared * in the calling (sub) program. LDA must be at least * ( k + 1 ). * Unchanged on exit. * * X - DOUBLE PRECISION array of dimension at least * ( 1 + ( n - 1 )*abs( INCX ) ). * Before entry, the incremented array X must contain the n * element right-hand side vector b. On exit, X is overwritten * with the solution vector x. * * INCX - INTEGER. * On entry, INCX specifies the increment for the elements of * X. INCX must not be zero. * Unchanged on exit. * * * Level 2 Blas routine. * * -- Written on 22-October-1986. * Jack Dongarra, Argonne National Lab. * Jeremy Du Croz, Nag Central Office. * Sven Hammarling, Nag Central Office. * Richard Hanson, Sandia National Labs. * * * .. Parameters .. DOUBLE PRECISION ZERO PARAMETER ( ZERO = 0.0D+0 ) * .. Local Scalars .. DOUBLE PRECISION TEMP INTEGER I, INFO, IX, J, JX, KPLUS1, KX, L LOGICAL NOUNIT * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. External Subroutines .. EXTERNAL XERBLA * .. Intrinsic Functions .. INTRINSIC MAX, MIN * .. * .. Executable Statements .. * * Test the input parameters. * INFO = 0 IF ( .NOT.LSAME( UPLO , 'U' ).AND. $ .NOT.LSAME( UPLO , 'L' ) )THEN INFO = 1 ELSE IF( .NOT.LSAME( TRANS, 'N' ).AND. $ .NOT.LSAME( TRANS, 'T' ).AND. $ .NOT.LSAME( TRANS, 'C' ) )THEN INFO = 2 ELSE IF( .NOT.LSAME( DIAG , 'U' ).AND. $ .NOT.LSAME( DIAG , 'N' ) )THEN INFO = 3 ELSE IF( N.LT.0 )THEN INFO = 4 ELSE IF( K.LT.0 )THEN INFO = 5 ELSE IF( LDA.LT.( K + 1 ) )THEN INFO = 7 ELSE IF( INCX.EQ.0 )THEN INFO = 9 END IF IF( INFO.NE.0 )THEN CALL XERBLA( 'DTBSV ', INFO ) RETURN END IF * * Quick return if possible. * IF( N.EQ.0 ) $ RETURN * NOUNIT = LSAME( DIAG, 'N' ) * * Set up the start point in X if the increment is not unity. This * will be ( N - 1 )*INCX too small for descending loops. * IF( INCX.LE.0 )THEN KX = 1 - ( N - 1 )*INCX ELSE IF( INCX.NE.1 )THEN KX = 1 END IF * * Start the operations. In this version the elements of A are * accessed by sequentially with one pass through A. * IF( LSAME( TRANS, 'N' ) )THEN * * Form x := inv( A )*x. * IF( LSAME( UPLO, 'U' ) )THEN KPLUS1 = K + 1 IF( INCX.EQ.1 )THEN DO 20, J = N, 1, -1 IF( X( J ).NE.ZERO )THEN L = KPLUS1 - J IF( NOUNIT ) $ X( J ) = X( J )/A( KPLUS1, J ) TEMP = X( J ) DO 10, I = J - 1, MAX( 1, J - K ), -1 X( I ) = X( I ) - TEMP*A( L + I, J ) 10 CONTINUE END IF 20 CONTINUE ELSE KX = KX + ( N - 1 )*INCX JX = KX DO 40, J = N, 1, -1 KX = KX - INCX IF( X( JX ).NE.ZERO )THEN IX = KX L = KPLUS1 - J IF( NOUNIT ) $ X( JX ) = X( JX )/A( KPLUS1, J ) TEMP = X( JX ) DO 30, I = J - 1, MAX( 1, J - K ), -1 X( IX ) = X( IX ) - TEMP*A( L + I, J ) IX = IX - INCX 30 CONTINUE END IF JX = JX - INCX 40 CONTINUE END IF ELSE IF( INCX.EQ.1 )THEN DO 60, J = 1, N IF( X( J ).NE.ZERO )THEN L = 1 - J IF( NOUNIT ) $ X( J ) = X( J )/A( 1, J ) TEMP = X( J ) DO 50, I = J + 1, MIN( N, J + K ) X( I ) = X( I ) - TEMP*A( L + I, J ) 50 CONTINUE END IF 60 CONTINUE ELSE JX = KX DO 80, J = 1, N KX = KX + INCX IF( X( JX ).NE.ZERO )THEN IX = KX L = 1 - J IF( NOUNIT ) $ X( JX ) = X( JX )/A( 1, J ) TEMP = X( JX ) DO 70, I = J + 1, MIN( N, J + K ) X( IX ) = X( IX ) - TEMP*A( L + I, J ) IX = IX + INCX 70 CONTINUE END IF JX = JX + INCX 80 CONTINUE END IF END IF ELSE * * Form x := inv( A')*x. * IF( LSAME( UPLO, 'U' ) )THEN KPLUS1 = K + 1 IF( INCX.EQ.1 )THEN DO 100, J = 1, N TEMP = X( J ) L = KPLUS1 - J DO 90, I = MAX( 1, J - K ), J - 1 TEMP = TEMP - A( L + I, J )*X( I ) 90 CONTINUE IF( NOUNIT ) $ TEMP = TEMP/A( KPLUS1, J ) X( J ) = TEMP 100 CONTINUE ELSE JX = KX DO 120, J = 1, N TEMP = X( JX ) IX = KX L = KPLUS1 - J DO 110, I = MAX( 1, J - K ), J - 1 TEMP = TEMP - A( L + I, J )*X( IX ) IX = IX + INCX 110 CONTINUE IF( NOUNIT ) $ TEMP = TEMP/A( KPLUS1, J ) X( JX ) = TEMP JX = JX + INCX IF( J.GT.K ) $ KX = KX + INCX 120 CONTINUE END IF ELSE IF( INCX.EQ.1 )THEN DO 140, J = N, 1, -1 TEMP = X( J ) L = 1 - J DO 130, I = MIN( N, J + K ), J + 1, -1 TEMP = TEMP - A( L + I, J )*X( I ) 130 CONTINUE IF( NOUNIT ) $ TEMP = TEMP/A( 1, J ) X( J ) = TEMP 140 CONTINUE ELSE KX = KX + ( N - 1 )*INCX JX = KX DO 160, J = N, 1, -1 TEMP = X( JX ) IX = KX L = 1 - J DO 150, I = MIN( N, J + K ), J + 1, -1 TEMP = TEMP - A( L + I, J )*X( IX ) IX = IX - INCX 150 CONTINUE IF( NOUNIT ) $ TEMP = TEMP/A( 1, J ) X( JX ) = TEMP JX = JX - INCX IF( ( N - J ).GE.K ) $ KX = KX - INCX 160 CONTINUE END IF END IF END IF * RETURN * * End of DTBSV . * END SUBROUTINE DCOPY(N,DX,INCX,DY,INCY) C***BEGIN PROLOGUE DCOPY C***DATE WRITTEN 791001 (YYMMDD) C***REVISION DATE 861211 (YYMMDD) C***CATEGORY NO. D1A5 C***KEYWORDS LIBRARY=SLATEC(BLAS), C TYPE=DOUBLE PRECISION(SCOPY-S DCOPY-D CCOPY-C),COPY, C LINEAR ALGEBRA,VECTOR C***AUTHOR LAWSON, C. L., (JPL) C HANSON, R. J., (SNLA) C KINCAID, D. R., (U. OF TEXAS) C KROGH, F. T., (JPL) C***PURPOSE D.P. vector copy y = x C***DESCRIPTION C C B L A S Subprogram C Description of Parameters C C --Input-- C N number of elements in input vector(s) C DX double precision vector with N elements C INCX storage spacing between elements of DX C DY double precision vector with N elements C INCY storage spacing between elements of DY C C --Output-- C DY copy of vector DX (unchanged if N .LE. 0) C C Copy double precision DX to double precision DY. C For I = 0 to N-1, copy DX(LX+I*INCX) to DY(LY+I*INCY), C where LX = 1 if INCX .GE. 0, else LX = (-INCX)*N, and LY is C defined in a similar way using INCY. C***REFERENCES LAWSON C.L., HANSON R.J., KINCAID D.R., KROGH F.T., C *BASIC LINEAR ALGEBRA SUBPROGRAMS FOR FORTRAN USAGE*, C ALGORITHM NO. 539, TRANSACTIONS ON MATHEMATICAL C SOFTWARE, VOLUME 5, NUMBER 3, SEPTEMBER 1979, 308-323 C***ROUTINES CALLED (NONE) C***END PROLOGUE DCOPY C DOUBLE PRECISION DX(1),DY(1) C***FIRST EXECUTABLE STATEMENT DCOPY IF(N.LE.0)RETURN IF(INCX.EQ.INCY) IF(INCX-1) 5,20,60 5 CONTINUE C C CODE FOR UNEQUAL OR NONPOSITIVE INCREMENTS. C IX = 1 IY = 1 IF(INCX.LT.0)IX = (-N+1)*INCX + 1 IF(INCY.LT.0)IY = (-N+1)*INCY + 1 DO 10 I = 1,N DY(IY) = DX(IX) IX = IX + INCX IY = IY + INCY 10 CONTINUE RETURN C C CODE FOR BOTH INCREMENTS EQUAL TO 1 C C C CLEAN-UP LOOP SO REMAINING VECTOR LENGTH IS A MULTIPLE OF 7. C 20 M = MOD(N,7) IF( M .EQ. 0 ) GO TO 40 DO 30 I = 1,M DY(I) = DX(I) 30 CONTINUE IF( N .LT. 7 ) RETURN 40 MP1 = M + 1 DO 50 I = MP1,N,7 DY(I) = DX(I) DY(I + 1) = DX(I + 1) DY(I + 2) = DX(I + 2) DY(I + 3) = DX(I + 3) DY(I + 4) = DX(I + 4) DY(I + 5) = DX(I + 5) DY(I + 6) = DX(I + 6) 50 CONTINUE RETURN C C CODE FOR EQUAL, POSITIVE, NONUNIT INCREMENTS. C 60 CONTINUE NS=N*INCX DO 70 I=1,NS,INCX DY(I) = DX(I) 70 CONTINUE RETURN END SUBROUTINE DAXPY(N,DA,DX,INCX,DY,INCY) C***BEGIN PROLOGUE DAXPY C***DATE WRITTEN 791001 (YYMMDD) C***REVISION DATE 861211 (YYMMDD) C***CATEGORY NO. D1A7 C***KEYWORDS LIBRARY=SLATEC(BLAS), C TYPE=DOUBLE PRECISION(SAXPY-S DAXPY-D CAXPY-C), C LINEAR ALGEBRA,TRIAD,VECTOR C***AUTHOR LAWSON, C. L., (JPL) C HANSON, R. J., (SNLA) C KINCAID, D. R., (U. OF TEXAS) C KROGH, F. T., (JPL) C***PURPOSE D.P computation y = a*x + y C***DESCRIPTION C C B L A S Subprogram C Description of Parameters C C --Input-- C N number of elements in input vector(s) C DA double precision scalar multiplier C DX double precision vector with N elements C INCX storage spacing between elements of DX C DY double precision vector with N elements C INCY storage spacing between elements of DY C C --Output-- C DY double precision result (unchanged if N .LE. 0) C C Overwrite double precision DY with double precision DA*DX + DY. C For I = 0 to N-1, replace DY(LY+I*INCY) with DA*DX(LX+I*INCX) + C DY(LY+I*INCY), where LX = 1 if INCX .GE. 0, else LX = (-INCX)*N C and LY is defined in a similar way using INCY. C***REFERENCES LAWSON C.L., HANSON R.J., KINCAID D.R., KROGH F.T., C *BASIC LINEAR ALGEBRA SUBPROGRAMS FOR FORTRAN USAGE*, C ALGORITHM NO. 539, TRANSACTIONS ON MATHEMATICAL C SOFTWARE, VOLUME 5, NUMBER 3, SEPTEMBER 1979, 308-323 C***ROUTINES CALLED (NONE) C***END PROLOGUE DAXPY C DOUBLE PRECISION DX(1),DY(1),DA C***FIRST EXECUTABLE STATEMENT DAXPY IF(N.LE.0.OR.DA.EQ.0.D0) RETURN IF(INCX.EQ.INCY) IF(INCX-1) 5,20,60 5 CONTINUE C C CODE FOR NONEQUAL OR NONPOSITIVE INCREMENTS. C IX = 1 IY = 1 IF(INCX.LT.0)IX = (-N+1)*INCX + 1 IF(INCY.LT.0)IY = (-N+1)*INCY + 1 DO 10 I = 1,N DY(IY) = DY(IY) + DA*DX(IX) IX = IX + INCX IY = IY + INCY 10 CONTINUE RETURN C C CODE FOR BOTH INCREMENTS EQUAL TO 1 C C C CLEAN-UP LOOP SO REMAINING VECTOR LENGTH IS A MULTIPLE OF 4. C 20 M = MOD(N,4) IF( M .EQ. 0 ) GO TO 40 DO 30 I = 1,M DY(I) = DY(I) + DA*DX(I) 30 CONTINUE IF( N .LT. 4 ) RETURN 40 MP1 = M + 1 DO 50 I = MP1,N,4 DY(I) = DY(I) + DA*DX(I) DY(I + 1) = DY(I + 1) + DA*DX(I + 1) DY(I + 2) = DY(I + 2) + DA*DX(I + 2) DY(I + 3) = DY(I + 3) + DA*DX(I + 3) 50 CONTINUE RETURN C C CODE FOR EQUAL, POSITIVE, NONUNIT INCREMENTS. C 60 CONTINUE NS = N*INCX DO 70 I=1,NS,INCX DY(I) = DA*DX(I) + DY(I) 70 CONTINUE RETURN END DOUBLE PRECISION FUNCTION DDOT(N,DX,INCX,DY,INCY) C C FORMS THE DOT PRODUCT OF TWO VECTORS. C USES UNROLLED LOOPS FOR INCREMENTS EQUAL TO ONE. C JACK DONGARRA, LINPACK, 3/11/78. C DOUBLE PRECISION DX(1),DY(1),DTEMP INTEGER I,INCX,INCY,IX,IY,M,MP1,N C DDOT = 0.0D0 DTEMP = 0.0D0 IF(N.LE.0)RETURN IF(INCX.EQ.1.AND.INCY.EQ.1)GO TO 20 C C CODE FOR UNEQUAL INCREMENTS OR EQUAL INCREMENTS C NOT EQUAL TO 1 C IX = 1 IY = 1 IF(INCX.LT.0)IX = (-N+1)*INCX + 1 IF(INCY.LT.0)IY = (-N+1)*INCY + 1 DO 10 I = 1,N DTEMP = DTEMP + DX(IX)*DY(IY) IX = IX + INCX IY = IY + INCY 10 CONTINUE DDOT = DTEMP RETURN C C CODE FOR BOTH INCREMENTS EQUAL TO 1 C C C CLEAN-UP LOOP C 20 M = MOD(N,5) IF( M .EQ. 0 ) GO TO 40 DO 30 I = 1,M DTEMP = DTEMP + DX(I)*DY(I) 30 CONTINUE IF( N .LT. 5 ) GO TO 60 40 MP1 = M + 1 DO 50 I = MP1,N,5 DTEMP = DTEMP + DX(I)*DY(I) + DX(I + 1)*DY(I + 1) + * DX(I + 2)*DY(I + 2) + DX(I + 3)*DY(I + 3) + DX(I + 4)*DY(I + 4) 50 CONTINUE 60 DDOT = DTEMP RETURN END DOUBLE PRECISION FUNCTION DNRM2(N,DX,INCX) C***BEGIN PROLOGUE DNRM2 C***DATE WRITTEN 791001 (YYMMDD) C***REVISION DATE 861211 (YYMMDD) C***CATEGORY NO. D1A3B C***KEYWORDS LIBRARY=SLATEC(BLAS), C TYPE=DOUBLE PRECISION(SNRM2-S DNRM2-D SCNRM2-C), C EUCLIDEAN LENGTH,EUCLIDEAN NORM,L2,LINEAR ALGEBRA,UNITARY, C VECTOR C***AUTHOR LAWSON, C. L., (JPL) C HANSON, R. J., (SNLA) C KINCAID, D. R., (U. OF TEXAS) C KROGH, F. T., (JPL) C***PURPOSE Euclidean length (L2 norm) of d.p. vector C***DESCRIPTION C C B L A S Subprogram C Description of parameters C C --Input-- C N number of elements in input vector(s) C DX double precision vector with N elements C INCX storage spacing between elements of DX C C --Output-- C DNRM2 double precision result (zero if N .LE. 0) C C Euclidean norm of the N-vector stored in DX() with storage C increment INCX . C If N .LE. 0 return with result = 0. C If N .GE. 1 then INCX must be .GE. 1 C C C.L. Lawson, 1978 Jan 08 C C Four phase method using two built-in constants that are C hopefully applicable to all machines. C CUTLO = maximum of DSQRT(U/EPS) over all known machines. C CUTHI = minimum of DSQRT(V) over all known machines. C where C EPS = smallest no. such that EPS + 1. .GT. 1. C U = smallest positive no. (underflow limit) C V = largest no. (overflow limit) C C Brief outline of algorithm.. C C Phase 1 scans zero components. C move to phase 2 when a component is nonzero and .LE. CUTLO C move to phase 3 when a component is .GT. CUTLO C move to phase 4 when a component is .GE. CUTHI/M C where M = N for X() real and M = 2*N for complex. C C Values for CUTLO and CUTHI.. C From the environmental parameters listed in the IMSL converter C document the limiting values are as followS.. C CUTLO, S.P. U/EPS = 2**(-102) for Honeywell. Close seconds are C Univac and DEC at 2**(-103) C Thus CUTLO = 2**(-51) = 4.44089E-16 C CUTHI, S.P. V = 2**127 for Univac, Honeywell, and DEC. C Thus CUTHI = 2**(63.5) = 1.30438E19 C CUTLO, D.P. U/EPS = 2**(-67) for Honeywell and DEC. C Thus CUTLO = 2**(-33.5) = 8.23181D-11 C CUTHI, D.P. same as S.P. CUTHI = 1.30438D19 SAVE CUTLO, CUTHI, ZERO, ONE C DATA CUTLO, CUTHI / 8.232D-11, 1.304D19 / C DATA CUTLO, CUTHI / 4.441E-16, 1.304E19 / C***REFERENCES LAWSON C.L., HANSON R.J., KINCAID D.R., KROGH F.T., C *BASIC LINEAR ALGEBRA SUBPROGRAMS FOR FORTRAN USAGE*, C ALGORITHM NO. 539, TRANSACTIONS ON MATHEMATICAL C SOFTWARE, VOLUME 5, NUMBER 3, SEPTEMBER 1979, 308-323 C***ROUTINES CALLED (NONE) C***END PROLOGUE DNRM2 INTEGER NEXT DOUBLE PRECISION DX(1), CUTLO, CUTHI, HITEST, SUM, XMAX,ZERO,ONE DATA ZERO, ONE /0.0D0, 1.0D0/ C DATA CUTLO, CUTHI / 8.232D-11, 1.304D19 / C***FIRST EXECUTABLE STATEMENT DNRM2 IF(N .GT. 0) GO TO 10 DNRM2 = ZERO GO TO 300 C 10 ASSIGN 30 TO NEXT SUM = ZERO NN = N * INCX C BEGIN MAIN LOOP I = 1 20 GO TO NEXT,(30, 50, 70, 110) 30 IF( DABS(DX(I)) .GT. CUTLO) GO TO 85 ASSIGN 50 TO NEXT XMAX = ZERO C C PHASE 1. SUM IS ZERO C 50 IF( DX(I) .EQ. ZERO) GO TO 200 IF( DABS(DX(I)) .GT. CUTLO) GO TO 85 C C PREPARE FOR PHASE 2. ASSIGN 70 TO NEXT GO TO 105 C C PREPARE FOR PHASE 4. C 100 I = J ASSIGN 110 TO NEXT SUM = (SUM / DX(I)) / DX(I) 105 XMAX = DABS(DX(I)) GO TO 115 C C PHASE 2. SUM IS SMALL. C SCALE TO AVOID DESTRUCTIVE UNDERFLOW. C 70 IF( DABS(DX(I)) .GT. CUTLO ) GO TO 75 C C COMMON CODE FOR PHASES 2 AND 4. C IN PHASE 4 SUM IS LARGE. SCALE TO AVOID OVERFLOW. C 110 IF( DABS(DX(I)) .LE. XMAX ) GO TO 115 SUM = ONE + SUM * (XMAX / DX(I))**2 XMAX = DABS(DX(I)) GO TO 200 C 115 SUM = SUM + (DX(I)/XMAX)**2 GO TO 200 C C C PREPARE FOR PHASE 3. C 75 SUM = (SUM * XMAX) * XMAX C C C FOR REAL OR D.P. SET HITEST = CUTHI/N C FOR COMPLEX SET HITEST = CUTHI/(2*N) C 85 HITEST = CUTHI/FLOAT( N ) C C PHASE 3. SUM IS MID-RANGE. NO SCALING. C DO 95 J =I,NN,INCX IF(DABS(DX(J)) .GE. HITEST) GO TO 100 95 SUM = SUM + DX(J)**2 DNRM2 = DSQRT( SUM ) GO TO 300 C 200 CONTINUE I = I + INCX IF ( I .LE. NN ) GO TO 20 C C END OF MAIN LOOP. C C COMPUTE SQUARE ROOT AND ADJUST FOR SCALING. C DNRM2 = XMAX * DSQRT(SUM) 300 CONTINUE RETURN END SUBROUTINE DSWAP(N,DX,INCX,DY,INCY) C***BEGIN PROLOGUE DSWAP C***DATE WRITTEN 791001 (YYMMDD) C***REVISION DATE 861211 (YYMMDD) C***CATEGORY NO. D1A5 C***KEYWORDS LIBRARY=SLATEC(BLAS), C TYPE=DOUBLE PRECISION(SSWAP-S DSWAP-D CSWAP-C ISWAP-I), C INTERCHANGE,LINEAR ALGEBRA,VECTOR C***AUTHOR LAWSON, C. L., (JPL) C HANSON, R. J., (SNLA) C KINCAID, D. R., (U. OF TEXAS) C KROGH, F. T., (JPL) C***PURPOSE Interchange d.p. vectors C***DESCRIPTION C C B L A S Subprogram C Description of Parameters C C --Input-- C N number of elements in input vector(s) C DX double precision vector with N elements C INCX storage spacing between elements of DX C DY double precision vector with N elements C INCY storage spacing between elements of DY C C --Output-- C DX input vector DY (unchanged if N .LE. 0) C DY input vector DX (unchanged if N .LE. 0) C C Interchange double precision DX and double precision DY. C For I = 0 to N-1, interchange DX(LX+I*INCX) and DY(LY+I*INCY), C where LX = 1 if INCX .GE. 0, else LX = (-INCX)*N, and LY is C defined in a similar way using INCY. C***REFERENCES LAWSON C.L., HANSON R.J., KINCAID D.R., KROGH F.T., C *BASIC LINEAR ALGEBRA SUBPROGRAMS FOR FORTRAN USAGE*, C ALGORITHM NO. 539, TRANSACTIONS ON MATHEMATICAL C SOFTWARE, VOLUME 5, NUMBER 3, SEPTEMBER 1979, 308-323 C***ROUTINES CALLED (NONE) C***END PROLOGUE DSWAP C DOUBLE PRECISION DX(1),DY(1),DTEMP1,DTEMP2,DTEMP3 C***FIRST EXECUTABLE STATEMENT DSWAP IF(N.LE.0)RETURN IF(INCX.EQ.INCY) IF(INCX-1) 5,20,60 5 CONTINUE C C CODE FOR UNEQUAL OR NONPOSITIVE INCREMENTS. C IX = 1 IY = 1 IF(INCX.LT.0)IX = (-N+1)*INCX + 1 IF(INCY.LT.0)IY = (-N+1)*INCY + 1 DO 10 I = 1,N DTEMP1 = DX(IX) DX(IX) = DY(IY) DY(IY) = DTEMP1 IX = IX + INCX IY = IY + INCY 10 CONTINUE RETURN C C CODE FOR BOTH INCREMENTS EQUAL TO 1 C C C CLEAN-UP LOOP SO REMAINING VECTOR LENGTH IS A MULTIPLE OF 3. C 20 M = MOD(N,3) IF( M .EQ. 0 ) GO TO 40 DO 30 I = 1,M DTEMP1 = DX(I) DX(I) = DY(I) DY(I) = DTEMP1 30 CONTINUE IF( N .LT. 3 ) RETURN 40 MP1 = M + 1 DO 50 I = MP1,N,3 DTEMP1 = DX(I) DTEMP2 = DX(I+1) DTEMP3 = DX(I+2) DX(I) = DY(I) DX(I+1) = DY(I+1) DX(I+2) = DY(I+2) DY(I) = DTEMP1 DY(I+1) = DTEMP2 DY(I+2) = DTEMP3 50 CONTINUE RETURN 60 CONTINUE C C CODE FOR EQUAL, POSITIVE, NONUNIT INCREMENTS. C NS = N*INCX DO 70 I=1,NS,INCX DTEMP1 = DX(I) DX(I) = DY(I) DY(I) = DTEMP1 70 CONTINUE RETURN END SUBROUTINE DSCAL(N,DA,DX,INCX) C***BEGIN PROLOGUE DSCAL C***DATE WRITTEN 791001 (YYMMDD) C***REVISION DATE 861211 (YYMMDD) C***CATEGORY NO. D1A6 C***KEYWORDS LIBRARY=SLATEC(BLAS), C TYPE=DOUBLE PRECISION(SSCAL-S DSCAL-D CSCAL-C), C LINEAR ALGEBRA,SCALE,VECTOR C***AUTHOR LAWSON, C. L., (JPL) C HANSON, R. J., (SNLA) C KINCAID, D. R., (U. OF TEXAS) C KROGH, F. T., (JPL) C***PURPOSE D.P. vector scale x = a*x C***DESCRIPTION C C B L A S Subprogram C Description of Parameters C C --Input-- C N number of elements in input vector(s) C DA double precision scale factor C DX double precision vector with N elements C INCX storage spacing between elements of DX C C --Output-- C DX double precision result (unchanged if N.LE.0) C C Replace double precision DX by double precision DA*DX. C For I = 0 to N-1, replace DX(1+I*INCX) with DA * DX(1+I*INCX) C***REFERENCES LAWSON C.L., HANSON R.J., KINCAID D.R., KROGH F.T., C *BASIC LINEAR ALGEBRA SUBPROGRAMS FOR FORTRAN USAGE*, C ALGORITHM NO. 539, TRANSACTIONS ON MATHEMATICAL C SOFTWARE, VOLUME 5, NUMBER 3, SEPTEMBER 1979, 308-323 C***ROUTINES CALLED (NONE) C***END PROLOGUE DSCAL C DOUBLE PRECISION DA,DX(1) C***FIRST EXECUTABLE STATEMENT DSCAL IF(N.LE.0)RETURN IF(INCX.EQ.1)GOTO 20 C C CODE FOR INCREMENTS NOT EQUAL TO 1. C NS = N*INCX DO 10 I = 1,NS,INCX DX(I) = DA*DX(I) 10 CONTINUE RETURN C C CODE FOR INCREMENTS EQUAL TO 1. C C C CLEAN-UP LOOP SO REMAINING VECTOR LENGTH IS A MULTIPLE OF 5. C 20 M = MOD(N,5) IF( M .EQ. 0 ) GO TO 40 DO 30 I = 1,M DX(I) = DA*DX(I) 30 CONTINUE IF( N .LT. 5 ) RETURN 40 MP1 = M + 1 DO 50 I = MP1,N,5 DX(I) = DA*DX(I) DX(I + 1) = DA*DX(I + 1) DX(I + 2) = DA*DX(I + 2) DX(I + 3) = DA*DX(I + 3) DX(I + 4) = DA*DX(I + 4) 50 CONTINUE RETURN END DOUBLE PRECISION FUNCTION DASUM(N,DX,INCX) C***BEGIN PROLOGUE DASUM C***DATE WRITTEN 791001 (YYMMDD) C***REVISION DATE 861211 (YYMMDD) C***CATEGORY NO. D1A3A C***KEYWORDS LIBRARY=SLATEC(BLAS), C TYPE=DOUBLE PRECISION(SASUM-S DASUM-D SCASUM-C),ADD, C LINEAR ALGEBRA,MAGNITUDE,SUM,VECTOR C***AUTHOR LAWSON, C. L., (JPL) C HANSON, R. J., (SNLA) C KINCAID, D. R., (U. OF TEXAS) C KROGH, F. T., (JPL) C***PURPOSE Sum of magnitudes of d.p. vector components C***DESCRIPTION C C B L A S Subprogram C Description of Parameters C C --Input-- C N number of elements in input vector(s) C DX double precision vector with N elements C INCX storage spacing between elements of DX C C --Output-- C DASUM double precision result (zero if N .LE. 0) C C Returns sum of magnitudes of double precision DX. C DASUM = sum from 0 to N-1 of DABS(DX(1+I*INCX)) C***REFERENCES LAWSON C.L., HANSON R.J., KINCAID D.R., KROGH F.T., C *BASIC LINEAR ALGEBRA SUBPROGRAMS FOR FORTRAN USAGE*, C ALGORITHM NO. 539, TRANSACTIONS ON MATHEMATICAL C SOFTWARE, VOLUME 5, NUMBER 3, SEPTEMBER 1979, 308-323 C***ROUTINES CALLED (NONE) C***END PROLOGUE DASUM C DOUBLE PRECISION DX(1) C***FIRST EXECUTABLE STATEMENT DASUM DASUM = 0.D0 IF(N.LE.0)RETURN IF(INCX.EQ.1)GOTO 20 C C CODE FOR INCREMENTS NOT EQUAL TO 1. C NS = N*INCX DO 10 I=1,NS,INCX DASUM = DASUM + DABS(DX(I)) 10 CONTINUE RETURN C C CODE FOR INCREMENTS EQUAL TO 1. C C C CLEAN-UP LOOP SO REMAINING VECTOR LENGTH IS A MULTIPLE OF 6. C 20 M = MOD(N,6) IF( M .EQ. 0 ) GO TO 40 DO 30 I = 1,M DASUM = DASUM + DABS(DX(I)) 30 CONTINUE IF( N .LT. 6 ) RETURN 40 MP1 = M + 1 DO 50 I = MP1,N,6 DASUM = DASUM + DABS(DX(I)) + DABS(DX(I+1)) + DABS(DX(I+2)) 1 + DABS(DX(I+3)) + DABS(DX(I+4)) + DABS(DX(I+5)) 50 CONTINUE RETURN END INTEGER FUNCTION IDAMAX(N,DX,INCX) C***BEGIN PROLOGUE IDAMAX C***DATE WRITTEN 791001 (YYMMDD) C***REVISION DATE 861211 (YYMMDD) C***CATEGORY NO. D1A2 C***KEYWORDS LIBRARY=SLATEC(BLAS), C TYPE=DOUBLE PRECISION(ISAMAX-S IDAMAX-D ICAMAX-C), C LINEAR ALGEBRA,MAXIMUM COMPONENT,VECTOR C***AUTHOR LAWSON, C. L., (JPL) C HANSON, R. J., (SNLA) C KINCAID, D. R., (U. OF TEXAS) C KROGH, F. T., (JPL) C***PURPOSE Find the smallest index of that component of a d.p. vector C having the maximum magnitude. C***DESCRIPTION C C B L A S Subprogram C Description of Parameters C C --Input-- C N number of elements in input vector(s) C DX double precision vector with N elements C INCX storage spacing between elements of DX C C --Output-- C IDAMAX smallest index (zero if N .LE. 0) C C Find smallest index of maximum magnitude of double precision DX. C IDAMAX = first I, I = 1 to N, to minimize ABS(DX(1-INCX+I*INCX) C***REFERENCES LAWSON C.L., HANSON R.J., KINCAID D.R., KROGH F.T., C *BASIC LINEAR ALGEBRA SUBPROGRAMS FOR FORTRAN USAGE*, C ALGORITHM NO. 539, TRANSACTIONS ON MATHEMATICAL C SOFTWARE, VOLUME 5, NUMBER 3, SEPTEMBER 1979, 308-323 C***ROUTINES CALLED (NONE) C***END PROLOGUE IDAMAX C DOUBLE PRECISION DX(*),DMAX,XMAG C***FIRST EXECUTABLE STATEMENT IDAMAX IDAMAX = 0 IF(N.LE.0) RETURN IDAMAX = 1 IF(N.LE.1)RETURN IF(INCX.EQ.1)GOTO 20 C C CODE FOR INCREMENTS NOT EQUAL TO 1. C DMAX = DABS(DX(1)) NS = N*INCX II = 1 DO 10 I = 1,NS,INCX XMAG = DABS(DX(I)) IF(XMAG.LE.DMAX) GO TO 5 IDAMAX = II DMAX = XMAG 5 II = II + 1 10 CONTINUE RETURN C C CODE FOR INCREMENTS EQUAL TO 1. C 20 DMAX = DABS(DX(1)) DO 30 I = 2,N XMAG = DABS(DX(I)) IF(XMAG.LE.DMAX) GO TO 30 IDAMAX = I DMAX = XMAG 30 CONTINUE RETURN END SHAR_EOF fi # end of overwriting check if test -f 'driver.f' then echo shar: will not over-write existing file "'driver.f'" else cat << "SHAR_EOF" > 'driver.f' C C C ARRAY length and grid parameters: C C LDA = Row dimension of array ABD used to store D**T*D C (and the matrix associated with the cubic spline C interpolant) in LAPACK band storage (packed) C format for the linear solver DPBSV (and CSPLIN). C C MMAX = Maximum number of grid points. The array storage C requirement is approximately 112*MMAX bytes for C 8-byte double precision numbers. C C NMAX = Maximum number of data points. C INTEGER LDA, MMAX, NMAX PARAMETER (LDA=3, NMAX=100, MMAX=900) C C Arrays: C DOUBLE PRECISION D(NMAX), S(NMAX), T(NMAX) DOUBLE PRECISION A(MMAX), ABD(LDA,MMAX), D1Y(MMAX), . D2Y(MMAX), G(MMAX), G0(MMAX), . P(MMAX), WK(MMAX,3), Y0(MMAX), . Y(MMAX) INTEGER IND(NMAX) C C Scalars and functions: C CHARACTER CHR CHARACTER*60 FNAME DOUBLE PRECISION DDOT, PHI DOUBLE PRECISION ALPHA, C2, C3, DD, DG, DGG, DPHI, DT, . DY, FMTOL, GG, GNRM1, GNRMM, H, PHI0, . PHIY, PHTOL, PLTSIZ, Q, SSIZ0, SSIZ1, . YMAX INTEGER I, IER, J, J1, J2, LIN, LOUT, LPLT, LPRT, M, . MAXCG, N, NCG, NG, NGMAX, NPHSM, NPHVAL, NPRNT LOGICAL L2G, OPT, PLT0, PRNT C C Parameters: C C FMTOL = Nonnegative tolerance for the line search: C length of the interval of uncertainty. Refer C to Function FMIN. C C L2G = Flag with value TRUE iff the L2-gradient is to be C used in place of the Sobolev gradient. C C MAXCG = Number of Polak-Ribiere conjugate gradient steps C between restarts with a steepest descent step. C C NGMAX = Maximum number of descent steps (outer itera- C tions) before termination without convergence. C NGMAX > 0. C C NPRNT = Number of descent steps between print steps. C For each print step, several lines of statistics C describing the step are written to unit LPRT. C The first and last descent steps are necessarily C print steps. NPRNT .GE. 1. C C OPT = Flag with value TRUE iff the optimal step-size C (computed by a line search) is to be used at each C descent step. C C PHTOL = Nonnegative tolerance which defines convergence C of the descent method: bound on Max(DPHI,DY**2, C DG**3), where C DPHI = abs(change in phi)/(1+phi), C DY = max-norm(change in Y)/(1+max-norm(Y)), C DG = max-norm(S-gradient)/(1+max-norm(Y)). C C PLT0 = Flag with value TRUE iff the initial estimate is C to be plotted. C C PLTSIZ = Plot size in inches for Postscript plots. C 1.0 <= PLTSIZ <= 6.5. C C SSIZ0 = Descent step size used if OPT = FALSE. C C SSIZ1 = Initial descent step size used if OPT = TRUE. C DATA FMTOL/1.D-6/, L2G/.FALSE./, MAXCG/3/, . NGMAX/200/, NPRNT/1/, OPT/.TRUE./, . PHTOL/1.D-3/, PLT0/.TRUE./, PLTSIZ/6.5/, . SSIZ0/1.D-3/, SSIZ1/1.D-5/ C C Logical unit numbers: C C LIN = Logical unit number for an input data set contain- C ing N, (T(I), I = 1,N), (D(I), I = 1,N), and H. C C LOUT = Logical unit number for writing the solution C M, (Y(I), I = 1,M), (D1Y(I), I = 1,M), and C (D2Y(I), I = 1,M): Subroutine WRITF. C C LPLT = Logical unit number for files containing C Postscript plots: initial estimate, spline C curve, and/or curvature. Refer to Subroutine C PLTCRV. C C LPRT = Logical unit number for output other than the C solution. C DATA LIN/5/, LOUT/6/, LPLT/3/, LPRT/4/ C C Open print file, delete it, and reopen it. This is C necessary on some systems (Microsoft) which ignore C end-of-file records. C OPEN (LPRT,FILE='dnsplin1.prt') CLOSE (LPRT,STATUS='DELETE') OPEN (LPRT,FILE='dnsplin1.prt') C C Get an input data set file name. C C 1 WRITE (*,200) C 200 FORMAT (//5X,'Specify the name of a file containing ', C . 'an input data set'/ C . 5X,'(at most 60 characters):'/) C READ (*,205,ERR=1) FNAME C 205 FORMAT (A60) C OPEN (LIN,FILE=FNAME,STATUS='OLD',ERR=1) C C Read input data, and compute indexes (1 to M=IND(N)) of C data points. C CALL READF (LIN,NMAX, N,T,D,H,IND,IER) IF (IER .NE. 0) GO TO 21 M = IND(N) IF (M .LT. 6 .OR. M .GT. MMAX .OR. M-N .LT. 1) . GO TO 22 C C Print a heading with parameter values. C WRITE (LPRT,100) 100 FORMAT (///27X,'DNSPLIN1 Output'/) WRITE (LPRT,110) T(1), T(N), N, M, H, MAXCG, FMTOL, . PHTOL, NGMAX 110 FORMAT (//5X,'Domain: T(1) = ',D10.3,', T(N) = ', . D10.3/ . 5X,'Number of data points: N = ',I4// . 5X,'Number of grid points: M = ',I5/ . 5X,'Mesh width: H = ',D12.6//1P, . 5X,'# CG steps between restarts: MAXCG = ', . I4/ . 5X,'Line search tolerance: FMTOL = ',D9.3/ . 5X,'Convergence tolerance: PHTOL = ',D9.3/ . 5X,'Max number of iterations: NGMAX = ',I6) C C Set Y0 to the gridpoint values of the Hermite cubic C interpolant with derivatives S at the data abscissae C obtained from the natural cubic spline. C CALL CSPLIN (LDA,N,T,D, ABD, S,IER) IF (IER .NE. 0) GO TO 23 C J2 = 1 DO 3 I = 1,N-1 J1 = J2 J2 = IND(I+1) Y0(J1) = D(I) DT = T(I+1)-T(I) DD = (D(I+1)-D(I))/DT C2 = (3.D0*DD-2.D0*S(I)-S(I+1))/DT C3 = (-2.D0*DD+S(I)+S(I+1))/(DT*DT) DT = 0.D0 DO 2 J = J1+1,J2-1 DT = DT + H Y0(J) = ((C3*DT + C2)*DT + S(I))*DT + D(I) 2 CONTINUE 3 CONTINUE Y0(J2) = D(N) C C Copy Y0 into Y. C DO 4 I = 1,M Y(I) = Y0(I) 4 CONTINUE C C Prompt for optional plot of initial estimate. C C 5 WRITE (*,210) C 210 FORMAT (//5X,'Create file dnsplin1.ps0 containing a ', C . 'plot '/ C . 5X,'of the initial estimate? (y/n)'/) C READ (*,215,ERR=5) CHR C 215 FORMAT (A1) C IF (CHR .NE. 'Y' .AND. CHR .NE. 'y' .AND. C . CHR .NE. 'N' .AND. CHR .NE. 'n') GO TO 5 C IF (CHR .EQ. 'Y' .OR. CHR .EQ. 'y') THEN OPEN (LPLT,FILE='dnsplin1.ps0') CLOSE (LPLT,STATUS='DELETE') OPEN (LPLT,FILE='dnsplin1.ps0') CALL PLTCRV (LPLT,N,T(1),T(N),T,D,M,Y0,.FALSE.,Y0, . PLTSIZ, IER) CLOSE (LPLT) IF (IER .NE. 0) GO TO 26 C ENDIF C C Compute PHI0 = phi(Y0). Grid-point values D1y(i), D2y(i), C and a(i) are also computed. C PHI0 = PHI (M,H,Y0, D1Y,D2Y,A) C C Initialize iteration counts: C C NCG = Number of conjugate gradient steps since the C previous restart with a steepest descent step. C C NG = Number of iterations (gradient evaluations). C C NPHSM = Total number of evaluations of phi in the line C searches. C C PRNT = TRUE iff statistics describing the iteration are C to be printed. C NCG = MAXCG NG = 0 NPHSM = 0 PRNT = .TRUE. C C Top of loop: compute the L2-gradient G = grad(phi), its C 1-norm GNRM1, and its max-norm GNRMM, and C overwrite G with the Sobolev gradient unless C L2G = TRUE. C 7 CALL GRADL2 (N,H,IND,M,D1Y,D2Y,A, WK, G,GNRM1, . GNRMM,IER) IF (IER .NE. 0) GO TO 24 IF (.NOT. L2G) THEN CALL GRADS4 (N,H,IND,M,D1Y,D2Y,LDA, ABD,G, . WK, IER) IF (IER .GT. 0) WRITE (LPRT,125) IER 125 FORMAT (//5X,'GRADS4 Failure: IER = ',I1) ENDIF C C Compute mean absolute L2-gradient component GNRM1. C GNRM1 = GNRM1/DBLE(M-N) C C Update iteration count. C NG = NG + 1 C C Print statistics associated with the step. C IF (PRNT) THEN IF (NCG .GE. MAXCG) THEN WRITE (LPRT,130) NG ELSE WRITE (LPRT,135) NG ENDIF WRITE (LPRT,140) PHI0, GNRM1, GNRMM ENDIF 130 FORMAT (//15X,'Iteration ',I6,' (Steepest descent)') 135 FORMAT (//15X,'Iteration ',I6,' (Conjugate gradient)') 140 FORMAT (5X,'Functional: phi(F) = ', . 1P,D21.15/ . 5X,'Mean absolute L2-gradient: GNRM1 = ', . D8.2/ . 5X,'Max-norm of L2-gradient: GNRMM = ', . D8.2) PRNT = (NPRNT*(NG/NPRNT) .EQ. NG) .OR. (NG .EQ. 1) C IF (NCG .GE. MAXCG) THEN C C Steepest descent step. C Q = 0.D0 NCG = 0 ELSE C C Conjugate gradient step. C GG = DDOT(M,G0,1,G0,1) DGG = DDOT(M,G,1,G,1) - DDOT(M,G0,1,G,1) Q = DGG/GG NCG = NCG + 1 ENDIF C C Compute the search direction p = -G + Q*p. C DO 8 I = 1,M P(I) = -G(I) + Q*P(I) 8 CONTINUE C C Copy Y into Y1 (WK column 1), compute the optimal step- C size ALPHA, and update Y to Y1+ALPHA*p. Difference C approximations to derivatives and terms defining phi(Y) C are returned in D1Y, D2Y, and A. The Max-norm of Y is C returned in YMAX, and DY is the relative change in Y: C Max-norm(Y-Y1)/(1+YMAX) = ALPHA*Max-norm(p)/(1+YMAX). C C The initial estimate for ALPHA should be small. Using C the step-size computed at the previously iteration can C result in an incorrect step-size caused by finding a C local minimum which is not a global minimum. C DO 9 I = 1,M WK(I,1) = Y(I) 9 CONTINUE IF (OPT) THEN ALPHA = SSIZ1 ELSE C C Use small constant step-size. C ALPHA = SSIZ0 ENDIF CALL LNSRCH (M,H,WK,PHI0,P,FMTOL,OPT, ALPHA,Y,D1Y, . D2Y,A, PHIY,NPHVAL,YMAX,DY,IER) IF (IER .NE. 0) GO TO 25 NPHSM = NPHSM + NPHVAL C C Adjust DY to the relative change in Y squared. C DY = DY**2 C C Compute the max-norm of the Sobolev gradient relative to C the solution y. C DG = 0.D0 DO 10 I = 1,M DG = MAX(DG,ABS(G(I))) 10 CONTINUE DG = (DG/(1.D0+YMAX))**3 C C Save a copy of the Sobolev gradient G in G0 for computing C the search direction in the next conjugate gradient C step. C IF (NCG .LT. MAXCG) THEN DO 11 I = 1,M G0(I) = G(I) 11 CONTINUE ENDIF C C Compute the relative change DPHI in phi and update PHI0. C Terminate on an increase in phi. C DPHI = (PHI0-PHIY)/(1.D0+PHI0) PHI0 = PHIY IF (DPHI .LT. 0.D0) NGMAX = NG C C Print statistics. C IF (PRNT) WRITE (LPRT,150) NPHVAL, ALPHA, PHIY, DPHI, . DY, DG 150 FORMAT (/5X,'Line search: No. phi evals NPHV = ', . I3/ . 5X,' Optimal step-size S = ', . 1P,D9.3/ . 5X,' Functional phi(Y) = ', . D21.15/ . 5X,' Relative change in phi(Y) DPHI = ', . D9.2/ . 5X,' Squared relative change in Y: DY = ', . D9.2/ . 5X,' Cubed S-gradient rel. to Y: DG = ', . D9.2/ . 1X,'______________________________________', . '___________________________') C C Test for termination. C IF ((DPHI .GE. PHTOL .OR. DY .GE. PHTOL .OR. . DG .GE. PHTOL) .AND. NG .LT. NGMAX) GO TO 7 IF (.NOT. PRNT) THEN C C Print parameter values. C IF (NCG .EQ. 0) THEN WRITE (LPRT,130) NG ELSE WRITE (LPRT,135) NG ENDIF WRITE (LPRT,140) PHI0, GNRM1, GNRMM WRITE (LPRT,150) NPHVAL, ALPHA, PHIY, DPHI, DY, DG ENDIF C C Compute the curve length in DY. C C2 = H*H DY = 0.D0 DO 12 I = 2,M DY = DY + SQRT(C2 + (Y(I)-Y(I-1))**2) 12 CONTINUE C C Print iteration counts and statistics. C WRITE (LPRT,160) NG 160 FORMAT (//5X,'Number of descent ', . 'iterations: ',I6) WRITE (LPRT,170) NPHSM 170 FORMAT (/5X,'Total number of phi evaluations ', . 'in the line searches: ',I7) WRITE (LPRT,180) DY 180 FORMAT (/5X,'Total polygonal curve length: ',D9.3) C C Write the solution to disk. C C OPEN (LOUT,FILE='dnsplin1.out') C CLOSE (LOUT,STATUS='DELETE') C OPEN (LOUT,FILE='dnsplin1.out') CALL WRITF (LOUT,M,Y,D1Y,D2Y) C C Plot the solution. C OPEN (LPLT,FILE='dnsplin1.ps') CLOSE (LPLT,STATUS='DELETE') OPEN (LPLT,FILE='dnsplin1.ps') CALL PLTCRV (LPLT,N,T(1),T(N),T,D,M,Y,PLT0,Y0, . PLTSIZ, IER) CLOSE (LPLT) IF (IER .NE. 0) GO TO 26 C C Prompt for optional plot of curvature. C C 13 WRITE (*,220) C 220 FORMAT (//5X,'Create file dnsplin1.ps2 containing a ', C . 'curvature plot? (y/n)'/) C READ (*,215,ERR=13) CHR C IF (CHR .NE. 'Y' .AND. CHR .NE. 'y' .AND. C . CHR .NE. 'N' .AND. CHR .NE. 'n') GO TO 13 C IF (CHR .EQ. 'Y' .OR. CHR .EQ. 'y') THEN OPEN (LPLT,FILE='dnsplin1.ps2') CLOSE (LPLT,STATUS='DELETE') OPEN (LPLT,FILE='dnsplin1.ps2') Y(1) = 0.D0 DO 14 I = 2,M-1 Y(I) = D2Y(I)/(1.D0+D1Y(I)**2)**1.5D0 14 CONTINUE Y(M) = 0.D0 DO 15 J = 1,N I = IND(J) D(J) = Y(I) 15 CONTINUE CALL PLTCRV (LPLT,N,T(1),T(N),T,D,M,Y,.FALSE.,Y0, . PLTSIZ, IER) CLOSE (LPLT) IF (IER .NE. 0) GO TO 26 C ENDIF STOP C C Error encountered in Subroutine READF. C 21 WRITE (LPRT,421) IER 421 FORMAT (///10X,'*** Error in READF: IER = ', . I1,' ***') STOP C C Invalid data: M < 6 or M > MMAX or M-N < 1. C 22 WRITE (LPRT,422) M, MMAX, N 422 FORMAT (///10X,'*** Error in data: M = ',I5, . ', MMAX = ',I5,', N = ',I4,' ***') STOP C C Error encountered in Subroutine CSPLIN. C 23 WRITE (LPRT,423) IER 423 FORMAT (///10X,'*** Error in CSPLIN: IER = ', . I1,' ***') STOP C C Error encountered in Subroutine GRADL2. C 24 WRITE (LPRT,424) IER 424 FORMAT (///10X,'*** Error in GRADL2: IER = ', . I1,' ***') STOP C C Error encountered in Subroutine LNSRCH. C 25 WRITE (LPRT,425) IER 425 FORMAT (///10X,'*** Error in LNSRCH: IER = ', . I1,' ***') STOP C C Error encountered in Subroutine PLTCRV. C 26 WRITE (LPRT,426) IER 426 FORMAT (///10X,'*** Error in PLTCRV: IER = ', . I1,' ***') STOP END SHAR_EOF fi # end of overwriting check if test -f 'interactive.f' then echo shar: will not over-write existing file "'interactive.f'" else cat << "SHAR_EOF" > 'interactive.f' C C ARRAY length and grid parameters: C C LDA = Row dimension of array ABD used to store D**T*D C (and the matrix associated with the cubic spline C interpolant) in LAPACK band storage (packed) C format for the linear solver DPBSV (and CSPLIN). C C MMAX = Maximum number of grid points. The array storage C requirement is approximately 112*MMAX bytes for C 8-byte double precision numbers. C C NMAX = Maximum number of data points. C INTEGER LDA, MMAX, NMAX PARAMETER (LDA=3, NMAX=100, MMAX=900) C C Arrays: C DOUBLE PRECISION D(NMAX), S(NMAX), T(NMAX) DOUBLE PRECISION A(MMAX), ABD(LDA,MMAX), D1Y(MMAX), . D2Y(MMAX), G(MMAX), G0(MMAX), . P(MMAX), WK(MMAX,3), Y0(MMAX), . Y(MMAX) INTEGER IND(NMAX) C C Scalars and functions: C CHARACTER CHR CHARACTER*60 FNAME DOUBLE PRECISION DDOT, PHI DOUBLE PRECISION ALPHA, C2, C3, DD, DG, DGG, DPHI, DT, . DY, FMTOL, GG, GNRM1, GNRMM, H, PHI0, . PHIY, PHTOL, PLTSIZ, Q, SSIZ0, SSIZ1, . YMAX INTEGER I, IER, J, J1, J2, LIN, LOUT, LPLT, LPRT, M, . MAXCG, N, NCG, NG, NGMAX, NPHSM, NPHVAL, NPRNT LOGICAL L2G, OPT, PLT0, PRNT C C Parameters: C C FMTOL = Nonnegative tolerance for the line search: C length of the interval of uncertainty. Refer C to Function FMIN. C C L2G = Flag with value TRUE iff the L2-gradient is to be C used in place of the Sobolev gradient. C C MAXCG = Number of Polak-Ribiere conjugate gradient steps C between restarts with a steepest descent step. C C NGMAX = Maximum number of descent steps (outer itera- C tions) before termination without convergence. C NGMAX > 0. C C NPRNT = Number of descent steps between print steps. C For each print step, several lines of statistics C describing the step are written to unit LPRT. C The first and last descent steps are necessarily C print steps. NPRNT .GE. 1. C C OPT = Flag with value TRUE iff the optimal step-size C (computed by a line search) is to be used at each C descent step. C C PHTOL = Nonnegative tolerance which defines convergence C of the descent method: bound on Max(DPHI,DY**2, C DG**3), where C DPHI = abs(change in phi)/(1+phi), C DY = max-norm(change in Y)/(1+max-norm(Y)), C DG = max-norm(S-gradient)/(1+max-norm(Y)). C C PLT0 = Flag with value TRUE iff the initial estimate is C to be plotted. C C PLTSIZ = Plot size in inches for Postscript plots. C 1.0 <= PLTSIZ <= 6.5. C C SSIZ0 = Descent step size used if OPT = FALSE. C C SSIZ1 = Initial descent step size used if OPT = TRUE. C DATA FMTOL/1.D-6/, L2G/.FALSE./, MAXCG/3/, . NGMAX/200/, NPRNT/1/, OPT/.TRUE./, . PHTOL/1.D-3/, PLT0/.TRUE./, PLTSIZ/6.5/, . SSIZ0/1.D-3/, SSIZ1/1.D-5/ C C Logical unit numbers: C C LIN = Logical unit number for an input data set contain- C ing N, (T(I), I = 1,N), (D(I), I = 1,N), and H. C C LOUT = Logical unit number for writing the solution C M, (Y(I), I = 1,M), (D1Y(I), I = 1,M), and C (D2Y(I), I = 1,M): Subroutine WRITF. C C LPLT = Logical unit number for files containing C Postscript plots: initial estimate, spline C curve, and/or curvature. Refer to Subroutine C PLTCRV. C C LPRT = Logical unit number for output other than the C solution. C DATA LIN/1/, LOUT/2/, LPLT/3/, LPRT/4/ C C Open print file, delete it, and reopen it. This is C necessary on some systems (Microsoft) which ignore C end-of-file records. C OPEN (LPRT,FILE='dnsplin1.prt') CLOSE (LPRT,STATUS='DELETE') OPEN (LPRT,FILE='dnsplin1.prt') C C Get an input data set file name. C 1 WRITE (*,200) 200 FORMAT (//5X,'Specify the name of a file containing ', . 'an input data set'/ . 5X,'(at most 60 characters):'/) READ (*,205,ERR=1) FNAME 205 FORMAT (A60) OPEN (LIN,FILE=FNAME,STATUS='OLD',ERR=1) C C Read input data, and compute indexes (1 to M=IND(N)) of C data points. C CALL READF (LIN,NMAX, N,T,D,H,IND,IER) IF (IER .NE. 0) GO TO 21 M = IND(N) IF (M .LT. 6 .OR. M .GT. MMAX .OR. M-N .LT. 1) . GO TO 22 C C Print a heading with parameter values. C WRITE (LPRT,100) 100 FORMAT (///27X,'DNSPLIN1 Output'/) WRITE (LPRT,110) T(1), T(N), N, M, H, MAXCG, FMTOL, . PHTOL, NGMAX 110 FORMAT (//5X,'Domain: T(1) = ',D10.3,', T(N) = ', . D10.3/ . 5X,'Number of data points: N = ',I4// . 5X,'Number of grid points: M = ',I5/ . 5X,'Mesh width: H = ',D12.6//1P, . 5X,'# CG steps between restarts: MAXCG = ', . I4/ . 5X,'Line search tolerance: FMTOL = ',D9.3/ . 5X,'Convergence tolerance: PHTOL = ',D9.3/ . 5X,'Max number of iterations: NGMAX = ',I6) C C Set Y0 to the gridpoint values of the Hermite cubic C interpolant with derivatives S at the data abscissae C obtained from the natural cubic spline. C CALL CSPLIN (LDA,N,T,D, ABD, S,IER) IF (IER .NE. 0) GO TO 23 C J2 = 1 DO 3 I = 1,N-1 J1 = J2 J2 = IND(I+1) Y0(J1) = D(I) DT = T(I+1)-T(I) DD = (D(I+1)-D(I))/DT C2 = (3.D0*DD-2.D0*S(I)-S(I+1))/DT C3 = (-2.D0*DD+S(I)+S(I+1))/(DT*DT) DT = 0.D0 DO 2 J = J1+1,J2-1 DT = DT + H Y0(J) = ((C3*DT + C2)*DT + S(I))*DT + D(I) 2 CONTINUE 3 CONTINUE Y0(J2) = D(N) C C Copy Y0 into Y. C DO 4 I = 1,M Y(I) = Y0(I) 4 CONTINUE C C Prompt for optional plot of initial estimate. C 5 WRITE (*,210) 210 FORMAT (//5X,'Create file dnsplin1.ps0 containing a ', . 'plot '/ . 5X,'of the initial estimate? (y/n)'/) READ (*,215,ERR=5) CHR 215 FORMAT (A1) IF (CHR .NE. 'Y' .AND. CHR .NE. 'y' .AND. . CHR .NE. 'N' .AND. CHR .NE. 'n') GO TO 5 IF (CHR .EQ. 'Y' .OR. CHR .EQ. 'y') THEN OPEN (LPLT,FILE='dnsplin1.ps0') CLOSE (LPLT,STATUS='DELETE') OPEN (LPLT,FILE='dnsplin1.ps0') CALL PLTCRV (LPLT,N,T(1),T(N),T,D,M,Y0,.FALSE.,Y0, . PLTSIZ, IER) CLOSE (LPLT) IF (IER .NE. 0) GO TO 26 ENDIF C C Compute PHI0 = phi(Y0). Grid-point values D1y(i), D2y(i), C and a(i) are also computed. C PHI0 = PHI (M,H,Y0, D1Y,D2Y,A) C C Initialize iteration counts: C C NCG = Number of conjugate gradient steps since the C previous restart with a steepest descent step. C C NG = Number of iterations (gradient evaluations). C C NPHSM = Total number of evaluations of phi in the line C searches. C C PRNT = TRUE iff statistics describing the iteration are C to be printed. C NCG = MAXCG NG = 0 NPHSM = 0 PRNT = .TRUE. C C Top of loop: compute the L2-gradient G = grad(phi), its C 1-norm GNRM1, and its max-norm GNRMM, and C overwrite G with the Sobolev gradient unless C L2G = TRUE. C 7 CALL GRADL2 (N,H,IND,M,D1Y,D2Y,A, WK, G,GNRM1, . GNRMM,IER) IF (IER .NE. 0) GO TO 24 IF (.NOT. L2G) THEN CALL GRADS4 (N,H,IND,M,D1Y,D2Y,LDA, ABD,G, . WK, IER) IF (IER .GT. 0) WRITE (LPRT,125) IER 125 FORMAT (//5X,'GRADS4 Failure: IER = ',I1) ENDIF C C Compute mean absolute L2-gradient component GNRM1. C GNRM1 = GNRM1/DBLE(M-N) C C Update iteration count. C NG = NG + 1 C C Print statistics associated with the step. C IF (PRNT) THEN IF (NCG .GE. MAXCG) THEN WRITE (LPRT,130) NG ELSE WRITE (LPRT,135) NG ENDIF WRITE (LPRT,140) PHI0, GNRM1, GNRMM ENDIF 130 FORMAT (//15X,'Iteration ',I6,' (Steepest descent)') 135 FORMAT (//15X,'Iteration ',I6,' (Conjugate gradient)') 140 FORMAT (5X,'Functional: phi(F) = ', . 1P,D21.15/ . 5X,'Mean absolute L2-gradient: GNRM1 = ', . D8.2/ . 5X,'Max-norm of L2-gradient: GNRMM = ', . D8.2) PRNT = (NPRNT*(NG/NPRNT) .EQ. NG) .OR. (NG .EQ. 1) C IF (NCG .GE. MAXCG) THEN C C Steepest descent step. C Q = 0.D0 NCG = 0 ELSE C C Conjugate gradient step. C GG = DDOT(M,G0,1,G0,1) DGG = DDOT(M,G,1,G,1) - DDOT(M,G0,1,G,1) Q = DGG/GG NCG = NCG + 1 ENDIF C C Compute the search direction p = -G + Q*p. C DO 8 I = 1,M P(I) = -G(I) + Q*P(I) 8 CONTINUE C C Copy Y into Y1 (WK column 1), compute the optimal step- C size ALPHA, and update Y to Y1+ALPHA*p. Difference C approximations to derivatives and terms defining phi(Y) C are returned in D1Y, D2Y, and A. The Max-norm of Y is C returned in YMAX, and DY is the relative change in Y: C Max-norm(Y-Y1)/(1+YMAX) = ALPHA*Max-norm(p)/(1+YMAX). C C The initial estimate for ALPHA should be small. Using C the step-size computed at the previously iteration can C result in an incorrect step-size caused by finding a C local minimum which is not a global minimum. C DO 9 I = 1,M WK(I,1) = Y(I) 9 CONTINUE IF (OPT) THEN ALPHA = SSIZ1 ELSE C C Use small constant step-size. C ALPHA = SSIZ0 ENDIF CALL LNSRCH (M,H,WK,PHI0,P,FMTOL,OPT, ALPHA,Y,D1Y, . D2Y,A, PHIY,NPHVAL,YMAX,DY,IER) IF (IER .NE. 0) GO TO 25 NPHSM = NPHSM + NPHVAL C C Adjust DY to the relative change in Y squared. C DY = DY**2 C C Compute the max-norm of the Sobolev gradient relative to C the solution y. C DG = 0.D0 DO 10 I = 1,M DG = MAX(DG,ABS(G(I))) 10 CONTINUE DG = (DG/(1.D0+YMAX))**3 C C Save a copy of the Sobolev gradient G in G0 for computing C the search direction in the next conjugate gradient C step. C IF (NCG .LT. MAXCG) THEN DO 11 I = 1,M G0(I) = G(I) 11 CONTINUE ENDIF C C Compute the relative change DPHI in phi and update PHI0. C Terminate on an increase in phi. C DPHI = (PHI0-PHIY)/(1.D0+PHI0) PHI0 = PHIY IF (DPHI .LT. 0.D0) NGMAX = NG C C Print statistics. C IF (PRNT) WRITE (LPRT,150) NPHVAL, ALPHA, PHIY, DPHI, . DY, DG 150 FORMAT (/5X,'Line search: No. phi evals NPHV = ', . I3/ . 5X,' Optimal step-size S = ', . 1P,D9.3/ . 5X,' Functional phi(Y) = ', . D21.15/ . 5X,' Relative change in phi(Y) DPHI = ', . D9.2/ . 5X,' Squared relative change in Y: DY = ', . D9.2/ . 5X,' Cubed S-gradient rel. to Y: DG = ', . D9.2/ . 1X,'______________________________________', . '___________________________') C C Test for termination. C IF ((DPHI .GE. PHTOL .OR. DY .GE. PHTOL .OR. . DG .GE. PHTOL) .AND. NG .LT. NGMAX) GO TO 7 IF (.NOT. PRNT) THEN C C Print parameter values. C IF (NCG .EQ. 0) THEN WRITE (LPRT,130) NG ELSE WRITE (LPRT,135) NG ENDIF WRITE (LPRT,140) PHI0, GNRM1, GNRMM WRITE (LPRT,150) NPHVAL, ALPHA, PHIY, DPHI, DY, DG ENDIF C C Compute the curve length in DY. C C2 = H*H DY = 0.D0 DO 12 I = 2,M DY = DY + SQRT(C2 + (Y(I)-Y(I-1))**2) 12 CONTINUE C C Print iteration counts and statistics. C WRITE (LPRT,160) NG 160 FORMAT (//5X,'Number of descent ', . 'iterations: ',I6) WRITE (LPRT,170) NPHSM 170 FORMAT (/5X,'Total number of phi evaluations ', . 'in the line searches: ',I7) WRITE (LPRT,180) DY 180 FORMAT (/5X,'Total polygonal curve length: ',D9.3) C C Write the solution to disk. C OPEN (LOUT,FILE='dnsplin1.out') CLOSE (LOUT,STATUS='DELETE') OPEN (LOUT,FILE='dnsplin1.out') CALL WRITF (LOUT,M,Y,D1Y,D2Y) C C Plot the solution. C OPEN (LPLT,FILE='dnsplin1.ps') CLOSE (LPLT,STATUS='DELETE') OPEN (LPLT,FILE='dnsplin1.ps') CALL PLTCRV (LPLT,N,T(1),T(N),T,D,M,Y,PLT0,Y0, . PLTSIZ, IER) CLOSE (LPLT) IF (IER .NE. 0) GO TO 26 C C Prompt for optional plot of curvature. C 13 WRITE (*,220) 220 FORMAT (//5X,'Create file dnsplin1.ps2 containing a ', . 'curvature plot? (y/n)'/) READ (*,215,ERR=13) CHR IF (CHR .NE. 'Y' .AND. CHR .NE. 'y' .AND. . CHR .NE. 'N' .AND. CHR .NE. 'n') GO TO 13 IF (CHR .EQ. 'Y' .OR. CHR .EQ. 'y') THEN OPEN (LPLT,FILE='dnsplin1.ps2') CLOSE (LPLT,STATUS='DELETE') OPEN (LPLT,FILE='dnsplin1.ps2') Y(1) = 0.D0 DO 14 I = 2,M-1 Y(I) = D2Y(I)/(1.D0+D1Y(I)**2)**1.5D0 14 CONTINUE Y(M) = 0.D0 DO 15 J = 1,N I = IND(J) D(J) = Y(I) 15 CONTINUE CALL PLTCRV (LPLT,N,T(1),T(N),T,D,M,Y,.FALSE.,Y0, . PLTSIZ, IER) CLOSE (LPLT) IF (IER .NE. 0) GO TO 26 ENDIF STOP C C Error encountered in Subroutine READF. C 21 WRITE (LPRT,421) IER 421 FORMAT (///10X,'*** Error in READF: IER = ', . I1,' ***') STOP C C Invalid data: M < 6 or M > MMAX or M-N < 1. C 22 WRITE (LPRT,422) M, MMAX, N 422 FORMAT (///10X,'*** Error in data: M = ',I5, . ', MMAX = ',I5,', N = ',I4,' ***') STOP C C Error encountered in Subroutine CSPLIN. C 23 WRITE (LPRT,423) IER 423 FORMAT (///10X,'*** Error in CSPLIN: IER = ', . I1,' ***') STOP C C Error encountered in Subroutine GRADL2. C 24 WRITE (LPRT,424) IER 424 FORMAT (///10X,'*** Error in GRADL2: IER = ', . I1,' ***') STOP C C Error encountered in Subroutine LNSRCH. C 25 WRITE (LPRT,425) IER 425 FORMAT (///10X,'*** Error in LNSRCH: IER = ', . I1,' ***') STOP C C Error encountered in Subroutine PLTCRV. C 26 WRITE (LPRT,426) IER 426 FORMAT (///10X,'*** Error in PLTCRV: IER = ', . I1,' ***') STOP END SHAR_EOF fi # end of overwriting check if test -f 'lapack.f' then echo shar: will not over-write existing file "'lapack.f'" else cat << "SHAR_EOF" > 'lapack.f' SUBROUTINE DPBSV( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO ) * * -- LAPACK driver routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * March 31, 1993 * * .. Scalar Arguments .. CHARACTER UPLO INTEGER INFO, KD, LDAB, LDB, N, NRHS * .. * .. Array Arguments .. DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ) * .. * * Purpose * ======= * * DPBSV computes the solution to a real system of linear equations * A * X = B, * where A is an N-by-N symmetric positive definite band matrix and X * and B are N-by-NRHS matrices. * * The Cholesky decomposition is used to factor A as * A = U**T * U, if UPLO = 'U', or * A = L * L**T, if UPLO = 'L', * where U is an upper triangular band matrix, and L is a lower * triangular band matrix, with the same number of superdiagonals or * subdiagonals as A. The factored form of A is then used to solve the * system of equations A * X = B. * * Arguments * ========= * * UPLO (input) CHARACTER*1 * = 'U': Upper triangle of A is stored; * = 'L': Lower triangle of A is stored. * * N (input) INTEGER * The number of linear equations, i.e., the order of the * matrix A. N >= 0. * * KD (input) INTEGER * The number of superdiagonals of the matrix A if UPLO = 'U', * or the number of subdiagonals if UPLO = 'L'. KD >= 0. * * NRHS (input) INTEGER * The number of right hand sides, i.e., the number of columns * of the matrix B. NRHS >= 0. * * AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N) * On entry, the upper or lower triangle of the symmetric band * matrix A, stored in the first KD+1 rows of the array. The * j-th column of A is stored in the j-th column of the array AB * as follows: * if UPLO = 'U', AB(KD+1+i-j,j) = A(i,j) for max(1,j-KD)<=i<=j; * if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(N,j+KD). * See below for further details. * * On exit, if INFO = 0, the triangular factor U or L from the * Cholesky factorization A = U**T*U or A = L*L**T of the band * matrix A, in the same storage format as A. * * LDAB (input) INTEGER * The leading dimension of the array AB. LDAB >= KD+1. * * B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) * On entry, the N-by-NRHS right hand side matrix B. * On exit, if INFO = 0, the N-by-NRHS solution matrix X. * * LDB (input) INTEGER * The leading dimension of the array B. LDB >= max(1,N). * * INFO (output) INTEGER * = 0: successful exit * < 0: if INFO = -i, the i-th argument had an illegal value * > 0: if INFO = i, the leading minor of order i of A is not * positive definite, so the factorization could not be * completed, and the solution has not been computed. * * Further Details * =============== * * The band storage scheme is illustrated by the following example, when * N = 6, KD = 2, and UPLO = 'U': * * On entry: On exit: * * * * a13 a24 a35 a46 * * u13 u24 u35 u46 * * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56 * a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66 * * Similarly, if UPLO = 'L' the format of A is as follows: * * On entry: On exit: * * a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66 * a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 * * a31 a42 a53 a64 * * l31 l42 l53 l64 * * * * Array elements marked * are not used by the routine. * * ===================================================================== * * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. * .. External Subroutines .. EXTERNAL DPBTRF, DPBTRS, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC MAX * .. * .. Executable Statements .. * * Test the input parameters. * INFO = 0 IF( .NOT.LSAME( UPLO, 'U' ) .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN INFO = -1 ELSE IF( N.LT.0 ) THEN INFO = -2 ELSE IF( KD.LT.0 ) THEN INFO = -3 ELSE IF( NRHS.LT.0 ) THEN INFO = -4 ELSE IF( LDAB.LT.KD+1 ) THEN INFO = -6 ELSE IF( LDB.LT.MAX( 1, N ) ) THEN INFO = -8 END IF IF( INFO.NE.0 ) THEN CALL XERBLA( 'DPBSV ', -INFO ) RETURN END IF * * Compute the Cholesky factorization A = U'*U or A = L*L'. * CALL DPBTRF( UPLO, N, KD, AB, LDAB, INFO ) IF( INFO.EQ.0 ) THEN * * Solve the system A*X = B, overwriting B with X. * CALL DPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO ) * END IF RETURN * * End of DPBSV * END SUBROUTINE DPBTRF( UPLO, N, KD, AB, LDAB, INFO ) * * -- LAPACK routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * March 31, 1993 * * .. Scalar Arguments .. CHARACTER UPLO INTEGER INFO, KD, LDAB, N * .. * .. Array Arguments .. DOUBLE PRECISION AB( LDAB, * ) * .. * * Purpose * ======= * * DPBTRF computes the Cholesky factorization of a real symmetric * positive definite band matrix A. * * The factorization has the form * A = U**T * U, if UPLO = 'U', or * A = L * L**T, if UPLO = 'L', * where U is an upper triangular matrix and L is lower triangular. * * Arguments * ========= * * UPLO (input) CHARACTER*1 * = 'U': Upper triangle of A is stored; * = 'L': Lower triangle of A is stored. * * N (input) INTEGER * The order of the matrix A. N >= 0. * * KD (input) INTEGER * The number of superdiagonals of the matrix A if UPLO = 'U', * or the number of subdiagonals if UPLO = 'L'. KD >= 0. * * AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N) * On entry, the upper or lower triangle of the symmetric band * matrix A, stored in the first KD+1 rows of the array. The * j-th column of A is stored in the j-th column of the array AB * as follows: * if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j; * if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd). * * On exit, if INFO = 0, the triangular factor U or L from the * Cholesky factorization A = U**T*U or A = L*L**T of the band * matrix A, in the same storage format as A. * * LDAB (input) INTEGER * The leading dimension of the array AB. LDAB >= KD+1. * * INFO (output) INTEGER * = 0: successful exit * < 0: if INFO = -i, the i-th argument had an illegal value * > 0: if INFO = i, the leading minor of order i is not * positive definite, and the factorization could not be * completed. * * Further Details * =============== * * The band storage scheme is illustrated by the following example, when * N = 6, KD = 2, and UPLO = 'U': * * On entry: On exit: * * * * a13 a24 a35 a46 * * u13 u24 u35 u46 * * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56 * a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66 * * Similarly, if UPLO = 'L' the format of A is as follows: * * On entry: On exit: * * a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66 * a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 * * a31 a42 a53 a64 * * l31 l42 l53 l64 * * * * Array elements marked * are not used by the routine. * * Contributed by * Peter Mayes and Giuseppe Radicati, IBM ECSEC, Rome, March 23, 1989 * * ===================================================================== * * .. Parameters .. DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) INTEGER NBMAX, LDWORK PARAMETER ( NBMAX = 32, LDWORK = NBMAX+1 ) * .. * .. Local Scalars .. INTEGER I, I2, I3, IB, II, J, JJ, NB * .. * .. Local Arrays .. DOUBLE PRECISION WORK( LDWORK, NBMAX ) * .. * .. External Functions .. LOGICAL LSAME INTEGER ILAENV EXTERNAL LSAME, ILAENV * .. * .. External Subroutines .. EXTERNAL DGEMM, DPBTF2, DPOTF2, DSYRK, DTRSM, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC MIN * .. * .. Executable Statements .. * * Test the input parameters. * INFO = 0 IF( ( .NOT.LSAME( UPLO, 'U' ) ) .AND. $ ( .NOT.LSAME( UPLO, 'L' ) ) ) THEN INFO = -1 ELSE IF( N.LT.0 ) THEN INFO = -2 ELSE IF( KD.LT.0 ) THEN INFO = -3 ELSE IF( LDAB.LT.KD+1 ) THEN INFO = -5 END IF IF( INFO.NE.0 ) THEN CALL XERBLA( 'DPBTRF', -INFO ) RETURN END IF * * Quick return if possible * IF( N.EQ.0 ) $ RETURN * * Determine the block size for this environment * NB = ILAENV( 1, 'DPBTRF', UPLO, N, KD, -1, -1 ) * * The block size must not exceed the semi-bandwidth KD, and must not * exceed the limit set by the size of the local array WORK. * NB = MIN( NB, NBMAX ) * IF( NB.LE.1 .OR. NB.GT.KD ) THEN * * Use unblocked code * CALL DPBTF2( UPLO, N, KD, AB, LDAB, INFO ) ELSE * * Use blocked code * IF( LSAME( UPLO, 'U' ) ) THEN * * Compute the Cholesky factorization of a symmetric band * matrix, given the upper triangle of the matrix in band * storage. * * Zero the upper triangle of the work array. * DO 20 J = 1, NB DO 10 I = 1, J - 1 WORK( I, J ) = ZERO 10 CONTINUE 20 CONTINUE * * Process the band matrix one diagonal block at a time. * DO 70 I = 1, N, NB IB = MIN( NB, N-I+1 ) * * Factorize the diagonal block * CALL DPOTF2( UPLO, IB, AB( KD+1, I ), LDAB-1, II ) IF( II.NE.0 ) THEN INFO = I + II - 1 GO TO 150 END IF IF( I+IB.LE.N ) THEN * * Update the relevant part of the trailing submatrix. * If A11 denotes the diagonal block which has just been * factorized, then we need to update the remaining * blocks in the diagram: * * A11 A12 A13 * A22 A23 * A33 * * The numbers of rows and columns in the partitioning * are IB, I2, I3 respectively. The blocks A12, A22 and * A23 are empty if IB = KD. The upper triangle of A13 * lies outside the band. * I2 = MIN( KD-IB, N-I-IB+1 ) I3 = MIN( IB, N-I-KD+1 ) * IF( I2.GT.0 ) THEN * * Update A12 * CALL DTRSM( 'Left', 'Upper', 'Transpose', $ 'Non-unit', IB, I2, ONE, AB( KD+1, I ), $ LDAB-1, AB( KD+1-IB, I+IB ), LDAB-1 ) * * Update A22 * CALL DSYRK( 'Upper', 'Transpose', I2, IB, -ONE, $ AB( KD+1-IB, I+IB ), LDAB-1, ONE, $ AB( KD+1, I+IB ), LDAB-1 ) END IF * IF( I3.GT.0 ) THEN * * Copy the lower triangle of A13 into the work array. * DO 40 JJ = 1, I3 DO 30 II = JJ, IB WORK( II, JJ ) = AB( II-JJ+1, JJ+I+KD-1 ) 30 CONTINUE 40 CONTINUE * * Update A13 (in the work array). * CALL DTRSM( 'Left', 'Upper', 'Transpose', $ 'Non-unit', IB, I3, ONE, AB( KD+1, I ), $ LDAB-1, WORK, LDWORK ) * * Update A23 * IF( I2.GT.0 ) $ CALL DGEMM( 'Transpose', 'No Transpose', I2, I3, $ IB, -ONE, AB( KD+1-IB, I+IB ), $ LDAB-1, WORK, LDWORK, ONE, $ AB( 1+IB, I+KD ), LDAB-1 ) * * Update A33 * CALL DSYRK( 'Upper', 'Transpose', I3, IB, -ONE, $ WORK, LDWORK, ONE, AB( KD+1, I+KD ), $ LDAB-1 ) * * Copy the lower triangle of A13 back into place. * DO 60 JJ = 1, I3 DO 50 II = JJ, IB AB( II-JJ+1, JJ+I+KD-1 ) = WORK( II, JJ ) 50 CONTINUE 60 CONTINUE END IF END IF 70 CONTINUE ELSE * * Compute the Cholesky factorization of a symmetric band * matrix, given the lower triangle of the matrix in band * storage. * * Zero the lower triangle of the work array. * DO 90 J = 1, NB DO 80 I = J + 1, NB WORK( I, J ) = ZERO 80 CONTINUE 90 CONTINUE * * Process the band matrix one diagonal block at a time. * DO 140 I = 1, N, NB IB = MIN( NB, N-I+1 ) * * Factorize the diagonal block * CALL DPOTF2( UPLO, IB, AB( 1, I ), LDAB-1, II ) IF( II.NE.0 ) THEN INFO = I + II - 1 GO TO 150 END IF IF( I+IB.LE.N ) THEN * * Update the relevant part of the trailing submatrix. * If A11 denotes the diagonal block which has just been * factorized, then we need to update the remaining * blocks in the diagram: * * A11 * A21 A22 * A31 A32 A33 * * The numbers of rows and columns in the partitioning * are IB, I2, I3 respectively. The blocks A21, A22 and * A32 are empty if IB = KD. The lower triangle of A31 * lies outside the band. * I2 = MIN( KD-IB, N-I-IB+1 ) I3 = MIN( IB, N-I-KD+1 ) * IF( I2.GT.0 ) THEN * * Update A21 * CALL DTRSM( 'Right', 'Lower', 'Transpose', $ 'Non-unit', I2, IB, ONE, AB( 1, I ), $ LDAB-1, AB( 1+IB, I ), LDAB-1 ) * * Update A22 * CALL DSYRK( 'Lower', 'No Transpose', I2, IB, -ONE, $ AB( 1+IB, I ), LDAB-1, ONE, $ AB( 1, I+IB ), LDAB-1 ) END IF * IF( I3.GT.0 ) THEN * * Copy the upper triangle of A31 into the work array. * DO 110 JJ = 1, IB DO 100 II = 1, MIN( JJ, I3 ) WORK( II, JJ ) = AB( KD+1-JJ+II, JJ+I-1 ) 100 CONTINUE 110 CONTINUE * * Update A31 (in the work array). * CALL DTRSM( 'Right', 'Lower', 'Transpose', $ 'Non-unit', I3, IB, ONE, AB( 1, I ), $ LDAB-1, WORK, LDWORK ) * * Update A32 * IF( I2.GT.0 ) $ CALL DGEMM( 'No transpose', 'Transpose', I3, I2, $ IB, -ONE, WORK, LDWORK, $ AB( 1+IB, I ), LDAB-1, ONE, $ AB( 1+KD-IB, I+IB ), LDAB-1 ) * * Update A33 * CALL DSYRK( 'Lower', 'No Transpose', I3, IB, -ONE, $ WORK, LDWORK, ONE, AB( 1, I+KD ), $ LDAB-1 ) * * Copy the upper triangle of A31 back into place. * DO 130 JJ = 1, IB DO 120 II = 1, MIN( JJ, I3 ) AB( KD+1-JJ+II, JJ+I-1 ) = WORK( II, JJ ) 120 CONTINUE 130 CONTINUE END IF END IF 140 CONTINUE END IF END IF RETURN * 150 CONTINUE RETURN * * End of DPBTRF * END SUBROUTINE DPBTF2( UPLO, N, KD, AB, LDAB, INFO ) * * -- LAPACK routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * February 29, 1992 * * .. Scalar Arguments .. CHARACTER UPLO INTEGER INFO, KD, LDAB, N * .. * .. Array Arguments .. DOUBLE PRECISION AB( LDAB, * ) * .. * * Purpose * ======= * * DPBTF2 computes the Cholesky factorization of a real symmetric * positive definite band matrix A. * * The factorization has the form * A = U' * U , if UPLO = 'U', or * A = L * L', if UPLO = 'L', * where U is an upper triangular matrix, U' is the transpose of U, and * L is lower triangular. * * This is the unblocked version of the algorithm, calling Level 2 BLAS. * * Arguments * ========= * * UPLO (input) CHARACTER*1 * Specifies whether the upper or lower triangular part of the * symmetric matrix A is stored: * = 'U': Upper triangular * = 'L': Lower triangular * * N (input) INTEGER * The order of the matrix A. N >= 0. * * KD (input) INTEGER * The number of super-diagonals of the matrix A if UPLO = 'U', * or the number of sub-diagonals if UPLO = 'L'. KD >= 0. * * AB (input/output) DOUBLE PRECISION array, dimension (LDAB,N) * On entry, the upper or lower triangle of the symmetric band * matrix A, stored in the first KD+1 rows of the array. The * j-th column of A is stored in the j-th column of the array AB * as follows: * if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j; * if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd). * * On exit, if INFO = 0, the triangular factor U or L from the * Cholesky factorization A = U'*U or A = L*L' of the band * matrix A, in the same storage format as A. * * LDAB (input) INTEGER * The leading dimension of the array AB. LDAB >= KD+1. * * INFO (output) INTEGER * = 0: successful exit * < 0: if INFO = -k, the k-th argument had an illegal value * > 0: if INFO = k, the leading minor of order k is not * positive definite, and the factorization could not be * completed. * * Further Details * =============== * * The band storage scheme is illustrated by the following example, when * N = 6, KD = 2, and UPLO = 'U': * * On entry: On exit: * * * * a13 a24 a35 a46 * * u13 u24 u35 u46 * * a12 a23 a34 a45 a56 * u12 u23 u34 u45 u56 * a11 a22 a33 a44 a55 a66 u11 u22 u33 u44 u55 u66 * * Similarly, if UPLO = 'L' the format of A is as follows: * * On entry: On exit: * * a11 a22 a33 a44 a55 a66 l11 l22 l33 l44 l55 l66 * a21 a32 a43 a54 a65 * l21 l32 l43 l54 l65 * * a31 a42 a53 a64 * * l31 l42 l53 l64 * * * * Array elements marked * are not used by the routine. * * ===================================================================== * * .. Parameters .. DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Local Scalars .. LOGICAL UPPER INTEGER J, KLD, KN DOUBLE PRECISION AJJ * .. * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. * .. External Subroutines .. EXTERNAL DSCAL, DSYR, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC MAX, MIN, SQRT * .. * .. Executable Statements .. * * Test the input parameters. * INFO = 0 UPPER = LSAME( UPLO, 'U' ) IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN INFO = -1 ELSE IF( N.LT.0 ) THEN INFO = -2 ELSE IF( KD.LT.0 ) THEN INFO = -3 ELSE IF( LDAB.LT.KD+1 ) THEN INFO = -5 END IF IF( INFO.NE.0 ) THEN CALL XERBLA( 'DPBTF2', -INFO ) RETURN END IF * * Quick return if possible * IF( N.EQ.0 ) $ RETURN * KLD = MAX( 1, LDAB-1 ) * IF( UPPER ) THEN * * Compute the Cholesky factorization A = U'*U. * DO 10 J = 1, N * * Compute U(J,J) and test for non-positive-definiteness. * AJJ = AB( KD+1, J ) IF( AJJ.LE.ZERO ) $ GO TO 30 AJJ = SQRT( AJJ ) AB( KD+1, J ) = AJJ * * Compute elements J+1:J+KN of row J and update the * trailing submatrix within the band. * KN = MIN( KD, N-J ) IF( KN.GT.0 ) THEN CALL DSCAL( KN, ONE / AJJ, AB( KD, J+1 ), KLD ) CALL DSYR( 'Upper', KN, -ONE, AB( KD, J+1 ), KLD, $ AB( KD+1, J+1 ), KLD ) END IF 10 CONTINUE ELSE * * Compute the Cholesky factorization A = L*L'. * DO 20 J = 1, N * * Compute L(J,J) and test for non-positive-definiteness. * AJJ = AB( 1, J ) IF( AJJ.LE.ZERO ) $ GO TO 30 AJJ = SQRT( AJJ ) AB( 1, J ) = AJJ * * Compute elements J+1:J+KN of column J and update the * trailing submatrix within the band. * KN = MIN( KD, N-J ) IF( KN.GT.0 ) THEN CALL DSCAL( KN, ONE / AJJ, AB( 2, J ), 1 ) CALL DSYR( 'Lower', KN, -ONE, AB( 2, J ), 1, $ AB( 1, J+1 ), KLD ) END IF 20 CONTINUE END IF RETURN * 30 CONTINUE INFO = J RETURN * * End of DPBTF2 * END SUBROUTINE DPOTF2( UPLO, N, A, LDA, INFO ) * * -- LAPACK routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * February 29, 1992 * * .. Scalar Arguments .. CHARACTER UPLO INTEGER INFO, LDA, N * .. * .. Array Arguments .. DOUBLE PRECISION A( LDA, * ) * .. * * Purpose * ======= * * DPOTF2 computes the Cholesky factorization of a real symmetric * positive definite matrix A. * * The factorization has the form * A = U' * U , if UPLO = 'U', or * A = L * L', if UPLO = 'L', * where U is an upper triangular matrix and L is lower triangular. * * This is the unblocked version of the algorithm, calling Level 2 BLAS. * * Arguments * ========= * * UPLO (input) CHARACTER*1 * Specifies whether the upper or lower triangular part of the * symmetric matrix A is stored. * = 'U': Upper triangular * = 'L': Lower triangular * * N (input) INTEGER * The order of the matrix A. N >= 0. * * A (input/output) DOUBLE PRECISION array, dimension (LDA,N) * On entry, the symmetric matrix A. If UPLO = 'U', the leading * n by n upper triangular part of A contains the upper * triangular part of the matrix A, and the strictly lower * triangular part of A is not referenced. If UPLO = 'L', the * leading n by n lower triangular part of A contains the lower * triangular part of the matrix A, and the strictly upper * triangular part of A is not referenced. * * On exit, if INFO = 0, the factor U or L from the Cholesky * factorization A = U'*U or A = L*L'. * * LDA (input) INTEGER * The leading dimension of the array A. LDA >= max(1,N). * * INFO (output) INTEGER * = 0: successful exit * < 0: if INFO = -k, the k-th argument had an illegal value * > 0: if INFO = k, the leading minor of order k is not * positive definite, and the factorization could not be * completed. * * ===================================================================== * * .. Parameters .. DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Local Scalars .. LOGICAL UPPER INTEGER J DOUBLE PRECISION AJJ * .. * .. External Functions .. LOGICAL LSAME DOUBLE PRECISION DDOT EXTERNAL LSAME, DDOT * .. * .. External Subroutines .. EXTERNAL DGEMV, DSCAL, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC MAX, SQRT * .. * .. Executable Statements .. * * Test the input parameters. * INFO = 0 UPPER = LSAME( UPLO, 'U' ) IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN INFO = -1 ELSE IF( N.LT.0 ) THEN INFO = -2 ELSE IF( LDA.LT.MAX( 1, N ) ) THEN INFO = -4 END IF IF( INFO.NE.0 ) THEN CALL XERBLA( 'DPOTF2', -INFO ) RETURN END IF * * Quick return if possible * IF( N.EQ.0 ) $ RETURN * IF( UPPER ) THEN * * Compute the Cholesky factorization A = U'*U. * DO 10 J = 1, N * * Compute U(J,J) and test for non-positive-definiteness. * AJJ = A( J, J ) - DDOT( J-1, A( 1, J ), 1, A( 1, J ), 1 ) IF( AJJ.LE.ZERO ) THEN A( J, J ) = AJJ GO TO 30 END IF AJJ = SQRT( AJJ ) A( J, J ) = AJJ * * Compute elements J+1:N of row J. * IF( J.LT.N ) THEN CALL DGEMV( 'Transpose', J-1, N-J, -ONE, A( 1, J+1 ), $ LDA, A( 1, J ), 1, ONE, A( J, J+1 ), LDA ) CALL DSCAL( N-J, ONE / AJJ, A( J, J+1 ), LDA ) END IF 10 CONTINUE ELSE * * Compute the Cholesky factorization A = L*L'. * DO 20 J = 1, N * * Compute L(J,J) and test for non-positive-definiteness. * AJJ = A( J, J ) - DDOT( J-1, A( J, 1 ), LDA, A( J, 1 ), $ LDA ) IF( AJJ.LE.ZERO ) THEN A( J, J ) = AJJ GO TO 30 END IF AJJ = SQRT( AJJ ) A( J, J ) = AJJ * * Compute elements J+1:N of column J. * IF( J.LT.N ) THEN CALL DGEMV( 'No transpose', N-J, J-1, -ONE, A( J+1, 1 ), $ LDA, A( J, 1 ), LDA, ONE, A( J+1, J ), 1 ) CALL DSCAL( N-J, ONE / AJJ, A( J+1, J ), 1 ) END IF 20 CONTINUE END IF GO TO 40 * 30 CONTINUE INFO = J * 40 CONTINUE RETURN * * End of DPOTF2 * END SUBROUTINE DPBTRS( UPLO, N, KD, NRHS, AB, LDAB, B, LDB, INFO ) * * -- LAPACK routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * September 30, 1994 * * .. Scalar Arguments .. CHARACTER UPLO INTEGER INFO, KD, LDAB, LDB, N, NRHS * .. * .. Array Arguments .. DOUBLE PRECISION AB( LDAB, * ), B( LDB, * ) * .. * * Purpose * ======= * * DPBTRS solves a system of linear equations A*X = B with a symmetric * positive definite band matrix A using the Cholesky factorization * A = U**T*U or A = L*L**T computed by DPBTRF. * * Arguments * ========= * * UPLO (input) CHARACTER*1 * = 'U': Upper triangular factor stored in AB; * = 'L': Lower triangular factor stored in AB. * * N (input) INTEGER * The order of the matrix A. N >= 0. * * KD (input) INTEGER * The number of superdiagonals of the matrix A if UPLO = 'U', * or the number of subdiagonals if UPLO = 'L'. KD >= 0. * * NRHS (input) INTEGER * The number of right hand sides, i.e., the number of columns * of the matrix B. NRHS >= 0. * * AB (input) DOUBLE PRECISION array, dimension (LDAB,N) * The triangular factor U or L from the Cholesky factorization * A = U**T*U or A = L*L**T of the band matrix A, stored in the * first KD+1 rows of the array. The j-th column of U or L is * stored in the j-th column of the array AB as follows: * if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j; * if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd). * * LDAB (input) INTEGER * The leading dimension of the array AB. LDAB >= KD+1. * * B (input/output) DOUBLE PRECISION array, dimension (LDB,NRHS) * On entry, the right hand side matrix B. * On exit, the solution matrix X. * * LDB (input) INTEGER * The leading dimension of the array B. LDB >= max(1,N). * * INFO (output) INTEGER * = 0: successful exit * < 0: if INFO = -i, the i-th argument had an illegal value * * ===================================================================== * * .. Local Scalars .. LOGICAL UPPER INTEGER J * .. * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. * .. External Subroutines .. EXTERNAL DTBSV, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC MAX * .. * .. Executable Statements .. * * Test the input parameters. * INFO = 0 UPPER = LSAME( UPLO, 'U' ) IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN INFO = -1 ELSE IF( N.LT.0 ) THEN INFO = -2 ELSE IF( KD.LT.0 ) THEN INFO = -3 ELSE IF( NRHS.LT.0 ) THEN INFO = -4 ELSE IF( LDAB.LT.KD+1 ) THEN INFO = -6 ELSE IF( LDB.LT.MAX( 1, N ) ) THEN INFO = -8 END IF IF( INFO.NE.0 ) THEN CALL XERBLA( 'DPBTRS', -INFO ) RETURN END IF * * Quick return if possible * IF( N.EQ.0 .OR. NRHS.EQ.0 ) $ RETURN * IF( UPPER ) THEN * * Solve A*X = B where A = U'*U. * DO 10 J = 1, NRHS * * Solve U'*X = B, overwriting B with X. * CALL DTBSV( 'Upper', 'Transpose', 'Non-unit', N, KD, AB, $ LDAB, B( 1, J ), 1 ) * * Solve U*X = B, overwriting B with X. * CALL DTBSV( 'Upper', 'No transpose', 'Non-unit', N, KD, AB, $ LDAB, B( 1, J ), 1 ) 10 CONTINUE ELSE * * Solve A*X = B where A = L*L'. * DO 20 J = 1, NRHS * * Solve L*X = B, overwriting B with X. * CALL DTBSV( 'Lower', 'No transpose', 'Non-unit', N, KD, AB, $ LDAB, B( 1, J ), 1 ) * * Solve L'*X = B, overwriting B with X. * CALL DTBSV( 'Lower', 'Transpose', 'Non-unit', N, KD, AB, $ LDAB, B( 1, J ), 1 ) 20 CONTINUE END IF * RETURN * * End of DPBTRS * END SUBROUTINE DPBCON( UPLO, N, KD, AB, LDAB, ANORM, RCOND, WORK, $ IWORK, INFO ) * * -- LAPACK routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * September 30, 1994 * * .. Scalar Arguments .. CHARACTER UPLO INTEGER INFO, KD, LDAB, N DOUBLE PRECISION ANORM, RCOND * .. * .. Array Arguments .. INTEGER IWORK( * ) DOUBLE PRECISION AB( LDAB, * ), WORK( * ) * .. * * Purpose * ======= * * DPBCON estimates the reciprocal of the condition number (in the * 1-norm) of a real symmetric positive definite band matrix using the * Cholesky factorization A = U**T*U or A = L*L**T computed by DPBTRF. * * An estimate is obtained for norm(inv(A)), and the reciprocal of the * condition number is computed as RCOND = 1 / (ANORM * norm(inv(A))). * * Arguments * ========= * * UPLO (input) CHARACTER*1 * = 'U': Upper triangular factor stored in AB; * = 'L': Lower triangular factor stored in AB. * * N (input) INTEGER * The order of the matrix A. N >= 0. * * KD (input) INTEGER * The number of superdiagonals of the matrix A if UPLO = 'U', * or the number of subdiagonals if UPLO = 'L'. KD >= 0. * * AB (input) DOUBLE PRECISION array, dimension (LDAB,N) * The triangular factor U or L from the Cholesky factorization * A = U**T*U or A = L*L**T of the band matrix A, stored in the * first KD+1 rows of the array. The j-th column of U or L is * stored in the j-th column of the array AB as follows: * if UPLO ='U', AB(kd+1+i-j,j) = U(i,j) for max(1,j-kd)<=i<=j; * if UPLO ='L', AB(1+i-j,j) = L(i,j) for j<=i<=min(n,j+kd). * * LDAB (input) INTEGER * The leading dimension of the array AB. LDAB >= KD+1. * * ANORM (input) DOUBLE PRECISION * The 1-norm (or infinity-norm) of the symmetric band matrix A. * * RCOND (output) DOUBLE PRECISION * The reciprocal of the condition number of the matrix A, * computed as RCOND = 1/(ANORM * AINVNM), where AINVNM is an * estimate of the 1-norm of inv(A) computed in this routine. * * WORK (workspace) DOUBLE PRECISION array, dimension (3*N) * * IWORK (workspace) INTEGER array, dimension (N) * * INFO (output) INTEGER * = 0: successful exit * < 0: if INFO = -i, the i-th argument had an illegal value * * ===================================================================== * * .. Parameters .. DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Local Scalars .. LOGICAL UPPER CHARACTER NORMIN INTEGER IX, KASE DOUBLE PRECISION AINVNM, SCALE, SCALEL, SCALEU, SMLNUM * .. * .. External Functions .. LOGICAL LSAME INTEGER IDAMAX DOUBLE PRECISION DLAMCH EXTERNAL LSAME, IDAMAX, DLAMCH * .. * .. External Subroutines .. EXTERNAL DLACON, DLATBS, DRSCL, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC ABS * .. * .. Executable Statements .. * * Test the input parameters. * INFO = 0 UPPER = LSAME( UPLO, 'U' ) IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN INFO = -1 ELSE IF( N.LT.0 ) THEN INFO = -2 ELSE IF( KD.LT.0 ) THEN INFO = -3 ELSE IF( LDAB.LT.KD+1 ) THEN INFO = -5 ELSE IF( ANORM.LT.ZERO ) THEN INFO = -6 END IF IF( INFO.NE.0 ) THEN CALL XERBLA( 'DPBCON', -INFO ) RETURN END IF * * Quick return if possible * RCOND = ZERO IF( N.EQ.0 ) THEN RCOND = ONE RETURN ELSE IF( ANORM.EQ.ZERO ) THEN RETURN END IF * SMLNUM = DLAMCH( 'Safe minimum' ) * * Estimate the 1-norm of the inverse. * KASE = 0 NORMIN = 'N' 10 CONTINUE CALL DLACON( N, WORK( N+1 ), WORK, IWORK, AINVNM, KASE ) IF( KASE.NE.0 ) THEN IF( UPPER ) THEN * * Multiply by inv(U'). * CALL DLATBS( 'Upper', 'Transpose', 'Non-unit', NORMIN, N, $ KD, AB, LDAB, WORK, SCALEL, WORK( 2*N+1 ), $ INFO ) NORMIN = 'Y' * * Multiply by inv(U). * CALL DLATBS( 'Upper', 'No transpose', 'Non-unit', NORMIN, N, $ KD, AB, LDAB, WORK, SCALEU, WORK( 2*N+1 ), $ INFO ) ELSE * * Multiply by inv(L). * CALL DLATBS( 'Lower', 'No transpose', 'Non-unit', NORMIN, N, $ KD, AB, LDAB, WORK, SCALEL, WORK( 2*N+1 ), $ INFO ) NORMIN = 'Y' * * Multiply by inv(L'). * CALL DLATBS( 'Lower', 'Transpose', 'Non-unit', NORMIN, N, $ KD, AB, LDAB, WORK, SCALEU, WORK( 2*N+1 ), $ INFO ) END IF * * Multiply by 1/SCALE if doing so will not cause overflow. * SCALE = SCALEL*SCALEU IF( SCALE.NE.ONE ) THEN IX = IDAMAX( N, WORK, 1 ) IF( SCALE.LT.ABS( WORK( IX ) )*SMLNUM .OR. SCALE.EQ.ZERO ) $ GO TO 20 CALL DRSCL( N, SCALE, WORK, 1 ) END IF GO TO 10 END IF * * Compute the estimate of the reciprocal condition number. * IF( AINVNM.NE.ZERO ) $ RCOND = ( ONE / AINVNM ) / ANORM * 20 CONTINUE * RETURN * * End of DPBCON * END SUBROUTINE DLABAD( SMALL, LARGE ) * * -- LAPACK auxiliary routine (version 2.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * October 31, 1992 * * .. Scalar Arguments .. DOUBLE PRECISION LARGE, SMALL * .. * * Purpose * ======= * * DLABAD takes as input the values computed by SLAMCH for underflow and * overflow, and returns the square root of each of these values if the * log of LARGE is sufficiently large. This subroutine is intended to * identify machines with a large exponent range, such as the Crays, and * redefine the underflow and overflow limits to be the square roots of * the values computed by DLAMCH. This subroutine is needed because * DLAMCH does not compensate for poor arithmetic in the upper half of * the exponent range, as is found on a Cray. * * Arguments * ========= * * SMALL (input/output) DOUBLE PRECISION * On entry, the underflow threshold as computed by DLAMCH. * On exit, if LOG10(LARGE) is sufficiently large, the square * root of SMALL, otherwise unchanged. * * LARGE (input/output) DOUBLE PRECISION * On entry, the overflow threshold as computed by DLAMCH. * On exit, if LOG10(LARGE) is sufficiently large, the square * root of LARGE, otherwise unchanged. * * ===================================================================== * * .. Intrinsic Functions .. INTRINSIC LOG10, SQRT * .. * .. Executable Statements .. * * If it looks like we're on a Cray, take the square root of * SMALL and LARGE to avoid overflow and underflow problems. * IF( LOG10( LARGE ).GT.2000.D0 ) THEN SMALL = SQRT( SMALL ) LARGE = SQRT( LARGE ) END IF * RETURN * * End of DLABAD * END SUBROUTINE DLACON( N, V, X, ISGN, EST, KASE ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * February 29, 1992 * * .. Scalar Arguments .. INTEGER KASE, N DOUBLE PRECISION EST * .. * .. Array Arguments .. INTEGER ISGN( * ) DOUBLE PRECISION V( * ), X( * ) * .. * * Purpose * ======= * * DLACON estimates the 1-norm of a square, real matrix A. * Reverse communication is used for evaluating matrix-vector products. * * Arguments * ========= * * N (input) INTEGER * The order of the matrix. N >= 1. * * V (workspace) DOUBLE PRECISION array, dimension (N) * On the final return, V = A*W, where EST = norm(V)/norm(W) * (W is not returned). * * X (input/output) DOUBLE PRECISION array, dimension (N) * On an intermediate return, X should be overwritten by * A * X, if KASE=1, * A' * X, if KASE=2, * and DLACON must be re-called with all the other parameters * unchanged. * * ISGN (workspace) INTEGER array, dimension (N) * * EST (output) DOUBLE PRECISION * An estimate (a lower bound) for norm(A). * * KASE (input/output) INTEGER * On the initial call to DLACON, KASE should be 0. * On an intermediate return, KASE will be 1 or 2, indicating * whether X should be overwritten by A * X or A' * X. * On the final return from DLACON, KASE will again be 0. * * Further Details * ======= ======= * * Contributed by Nick Higham, University of Manchester. * Originally named SONEST, dated March 16, 1988. * * Reference: N.J. Higham, "FORTRAN codes for estimating the one-norm of * a real or complex matrix, with applications to condition estimation", * ACM Trans. Math. Soft., vol. 14, no. 4, pp. 381-396, December 1988. * * ===================================================================== * * .. Parameters .. INTEGER ITMAX PARAMETER ( ITMAX = 5 ) DOUBLE PRECISION ZERO, ONE, TWO PARAMETER ( ZERO = 0.0D+0, ONE = 1.0D+0, TWO = 2.0D+0 ) * .. * .. Local Scalars .. INTEGER I, ITER, J, JLAST, JUMP DOUBLE PRECISION ALTSGN, ESTOLD, TEMP * .. * .. External Functions .. INTEGER IDAMAX DOUBLE PRECISION DASUM EXTERNAL IDAMAX, DASUM * .. * .. External Subroutines .. EXTERNAL DCOPY * .. * .. Intrinsic Functions .. INTRINSIC ABS, DBLE, NINT, SIGN * .. * .. Save statement .. SAVE * .. * .. Executable Statements .. * IF( KASE.EQ.0 ) THEN DO 10 I = 1, N X( I ) = ONE / DBLE( N ) 10 CONTINUE KASE = 1 JUMP = 1 RETURN END IF * GO TO ( 20, 40, 70, 110, 140 )JUMP * * ................ ENTRY (JUMP = 1) * FIRST ITERATION. X HAS BEEN OVERWRITTEN BY A*X. * 20 CONTINUE IF( N.EQ.1 ) THEN V( 1 ) = X( 1 ) EST = ABS( V( 1 ) ) * ... QUIT GO TO 150 END IF EST = DASUM( N, X, 1 ) * DO 30 I = 1, N X( I ) = SIGN( ONE, X( I ) ) ISGN( I ) = NINT( X( I ) ) 30 CONTINUE KASE = 2 JUMP = 2 RETURN * * ................ ENTRY (JUMP = 2) * FIRST ITERATION. X HAS BEEN OVERWRITTEN BY TRANDPOSE(A)*X. * 40 CONTINUE J = IDAMAX( N, X, 1 ) ITER = 2 * * MAIN LOOP - ITERATIONS 2,3,...,ITMAX. * 50 CONTINUE DO 60 I = 1, N X( I ) = ZERO 60 CONTINUE X( J ) = ONE KASE = 1 JUMP = 3 RETURN * * ................ ENTRY (JUMP = 3) * X HAS BEEN OVERWRITTEN BY A*X. * 70 CONTINUE CALL DCOPY( N, X, 1, V, 1 ) ESTOLD = EST EST = DASUM( N, V, 1 ) DO 80 I = 1, N IF( NINT( SIGN( ONE, X( I ) ) ).NE.ISGN( I ) ) $ GO TO 90 80 CONTINUE * REPEATED SIGN VECTOR DETECTED, HENCE ALGORITHM HAS CONVERGED. GO TO 120 * 90 CONTINUE * TEST FOR CYCLING. IF( EST.LE.ESTOLD ) $ GO TO 120 * DO 100 I = 1, N X( I ) = SIGN( ONE, X( I ) ) ISGN( I ) = NINT( X( I ) ) 100 CONTINUE KASE = 2 JUMP = 4 RETURN * * ................ ENTRY (JUMP = 4) * X HAS BEEN OVERWRITTEN BY TRANDPOSE(A)*X. * 110 CONTINUE JLAST = J J = IDAMAX( N, X, 1 ) IF( ( X( JLAST ).NE.ABS( X( J ) ) ) .AND. ( ITER.LT.ITMAX ) ) THEN ITER = ITER + 1 GO TO 50 END IF * * ITERATION COMPLETE. FINAL STAGE. * 120 CONTINUE ALTSGN = ONE DO 130 I = 1, N X( I ) = ALTSGN*( ONE+DBLE( I-1 ) / DBLE( N-1 ) ) ALTSGN = -ALTSGN 130 CONTINUE KASE = 1 JUMP = 5 RETURN * * ................ ENTRY (JUMP = 5) * X HAS BEEN OVERWRITTEN BY A*X. * 140 CONTINUE TEMP = TWO*( DASUM( N, X, 1 ) / DBLE( 3*N ) ) IF( TEMP.GT.EST ) THEN CALL DCOPY( N, X, 1, V, 1 ) EST = TEMP END IF * 150 CONTINUE KASE = 0 RETURN * * End of DLACON * END DOUBLE PRECISION FUNCTION DLAMCH( CMACH ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * October 31, 1992 * * .. Scalar Arguments .. CHARACTER CMACH * .. * * Purpose * ======= * * DLAMCH determines double precision machine parameters. * * Arguments * ========= * * CMACH (input) CHARACTER*1 * Specifies the value to be returned by DLAMCH: * = 'E' or 'e', DLAMCH := eps * = 'S' or 's , DLAMCH := sfmin * = 'B' or 'b', DLAMCH := base * = 'P' or 'p', DLAMCH := eps*base * = 'N' or 'n', DLAMCH := t * = 'R' or 'r', DLAMCH := rnd * = 'M' or 'm', DLAMCH := emin * = 'U' or 'u', DLAMCH := rmin * = 'L' or 'l', DLAMCH := emax * = 'O' or 'o', DLAMCH := rmax * * where * * eps = relative machine precision * sfmin = safe minimum, such that 1/sfmin does not overflow * base = base of the machine * prec = eps*base * t = number of (base) digits in the mantissa * rnd = 1.0 when rounding occurs in addition, 0.0 otherwise * emin = minimum exponent before (gradual) underflow * rmin = underflow threshold - base**(emin-1) * emax = largest exponent before overflow * rmax = overflow threshold - (base**emax)*(1-eps) * * ===================================================================== * * .. Parameters .. DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Local Scalars .. LOGICAL FIRST, LRND INTEGER BETA, IMAX, IMIN, IT DOUBLE PRECISION BASE, EMAX, EMIN, EPS, PREC, RMACH, RMAX, RMIN, $ RND, SFMIN, SMALL, T * .. * .. External Functions .. LOGICAL LSAME EXTERNAL LSAME * .. * .. External Subroutines .. EXTERNAL DLAMC2 * .. * .. Save statement .. SAVE FIRST, EPS, SFMIN, BASE, T, RND, EMIN, RMIN, $ EMAX, RMAX, PREC * .. * .. Data statements .. DATA FIRST / .TRUE. / * .. * .. Executable Statements .. * IF( FIRST ) THEN FIRST = .FALSE. CALL DLAMC2( BETA, IT, LRND, EPS, IMIN, RMIN, IMAX, RMAX ) BASE = BETA T = IT IF( LRND ) THEN RND = ONE EPS = ( BASE**( 1-IT ) ) / 2 ELSE RND = ZERO EPS = BASE**( 1-IT ) END IF PREC = EPS*BASE EMIN = IMIN EMAX = IMAX SFMIN = RMIN SMALL = ONE / RMAX IF( SMALL.GE.SFMIN ) THEN * * Use SMALL plus a bit, to avoid the possibility of rounding * causing overflow when computing 1/sfmin. * SFMIN = SMALL*( ONE+EPS ) END IF END IF * IF( LSAME( CMACH, 'E' ) ) THEN RMACH = EPS ELSE IF( LSAME( CMACH, 'S' ) ) THEN RMACH = SFMIN ELSE IF( LSAME( CMACH, 'B' ) ) THEN RMACH = BASE ELSE IF( LSAME( CMACH, 'P' ) ) THEN RMACH = PREC ELSE IF( LSAME( CMACH, 'N' ) ) THEN RMACH = T ELSE IF( LSAME( CMACH, 'R' ) ) THEN RMACH = RND ELSE IF( LSAME( CMACH, 'M' ) ) THEN RMACH = EMIN ELSE IF( LSAME( CMACH, 'U' ) ) THEN RMACH = RMIN ELSE IF( LSAME( CMACH, 'L' ) ) THEN RMACH = EMAX ELSE IF( LSAME( CMACH, 'O' ) ) THEN RMACH = RMAX END IF * DLAMCH = RMACH RETURN * * End of DLAMCH * END * ************************************************************************ * SUBROUTINE DLAMC1( BETA, T, RND, IEEE1 ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * October 31, 1992 * * .. Scalar Arguments .. LOGICAL IEEE1, RND INTEGER BETA, T * .. * * Purpose * ======= * * DLAMC1 determines the machine parameters given by BETA, T, RND, and * IEEE1. * * Arguments * ========= * * BETA (output) INTEGER * The base of the machine. * * T (output) INTEGER * The number of ( BETA ) digits in the mantissa. * * RND (output) LOGICAL * Specifies whether proper rounding ( RND = .TRUE. ) or * chopping ( RND = .FALSE. ) occurs in addition. This may not * be a reliable guide to the way in which the machine performs * its arithmetic. * * IEEE1 (output) LOGICAL * Specifies whether rounding appears to be done in the IEEE * 'round to nearest' style. * * Further Details * =============== * * The routine is based on the routine ENVRON by Malcolm and * incorporates suggestions by Gentleman and Marovich. See * * Malcolm M. A. (1972) Algorithms to reveal properties of * floating-point arithmetic. Comms. of the ACM, 15, 949-951. * * Gentleman W. M. and Marovich S. B. (1974) More on algorithms * that reveal properties of floating point arithmetic units. * Comms. of the ACM, 17, 276-277. * * ===================================================================== * * .. Local Scalars .. LOGICAL FIRST, LIEEE1, LRND INTEGER LBETA, LT DOUBLE PRECISION A, B, C, F, ONE, QTR, SAVEC, T1, T2 * .. * .. External Functions .. DOUBLE PRECISION DLAMC3 EXTERNAL DLAMC3 * .. * .. Save statement .. SAVE FIRST, LIEEE1, LBETA, LRND, LT * .. * .. Data statements .. DATA FIRST / .TRUE. / * .. * .. Executable Statements .. * IF( FIRST ) THEN FIRST = .FALSE. ONE = 1 * * LBETA, LIEEE1, LT and LRND are the local values of BETA, * IEEE1, T and RND. * * Throughout this routine we use the function DLAMC3 to ensure * that relevant values are stored and not held in registers, or * are not affected by optimizers. * * Compute a = 2.0**m with the smallest positive integer m such * that * * fl( a + 1.0 ) = a. * A = 1 C = 1 * *+ WHILE( C.EQ.ONE )LOOP 10 CONTINUE IF( C.EQ.ONE ) THEN A = 2*A C = DLAMC3( A, ONE ) C = DLAMC3( C, -A ) GO TO 10 END IF *+ END WHILE * * Now compute b = 2.0**m with the smallest positive integer m * such that * * fl( a + b ) .gt. a. * B = 1 C = DLAMC3( A, B ) * *+ WHILE( C.EQ.A )LOOP 20 CONTINUE IF( C.EQ.A ) THEN B = 2*B C = DLAMC3( A, B ) GO TO 20 END IF *+ END WHILE * * Now compute the base. a and c are neighbouring floating point * numbers in the interval ( beta**t, beta**( t + 1 ) ) and so * their difference is beta. Adding 0.25 to c is to ensure that it * is truncated to beta and not ( beta - 1 ). * QTR = ONE / 4 SAVEC = C C = DLAMC3( C, -A ) LBETA = C + QTR * * Now determine whether rounding or chopping occurs, by adding a * bit less than beta/2 and a bit more than beta/2 to a. * B = LBETA F = DLAMC3( B / 2, -B / 100 ) C = DLAMC3( F, A ) IF( C.EQ.A ) THEN LRND = .TRUE. ELSE LRND = .FALSE. END IF F = DLAMC3( B / 2, B / 100 ) C = DLAMC3( F, A ) IF( ( LRND ) .AND. ( C.EQ.A ) ) $ LRND = .FALSE. * * Try and decide whether rounding is done in the IEEE 'round to * nearest' style. B/2 is half a unit in the last place of the two * numbers A and SAVEC. Furthermore, A is even, i.e. has last bit * zero, and SAVEC is odd. Thus adding B/2 to A should not change * A, but adding B/2 to SAVEC should change SAVEC. * T1 = DLAMC3( B / 2, A ) T2 = DLAMC3( B / 2, SAVEC ) LIEEE1 = ( T1.EQ.A ) .AND. ( T2.GT.SAVEC ) .AND. LRND * * Now find the mantissa, t. It should be the integer part of * log to the base beta of a, however it is safer to determine t * by powering. So we find t as the smallest positive integer for * which * * fl( beta**t + 1.0 ) = 1.0. * LT = 0 A = 1 C = 1 * *+ WHILE( C.EQ.ONE )LOOP 30 CONTINUE IF( C.EQ.ONE ) THEN LT = LT + 1 A = A*LBETA C = DLAMC3( A, ONE ) C = DLAMC3( C, -A ) GO TO 30 END IF *+ END WHILE * END IF * BETA = LBETA T = LT RND = LRND IEEE1 = LIEEE1 RETURN * * End of DLAMC1 * END * ************************************************************************ * SUBROUTINE DLAMC2( BETA, T, RND, EPS, EMIN, RMIN, EMAX, RMAX ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * October 31, 1992 * * .. Scalar Arguments .. LOGICAL RND INTEGER BETA, EMAX, EMIN, T DOUBLE PRECISION EPS, RMAX, RMIN * .. * * Purpose * ======= * * DLAMC2 determines the machine parameters specified in its argument * list. * * Arguments * ========= * * BETA (output) INTEGER * The base of the machine. * * T (output) INTEGER * The number of ( BETA ) digits in the mantissa. * * RND (output) LOGICAL * Specifies whether proper rounding ( RND = .TRUE. ) or * chopping ( RND = .FALSE. ) occurs in addition. This may not * be a reliable guide to the way in which the machine performs * its arithmetic. * * EPS (output) DOUBLE PRECISION * The smallest positive number such that * * fl( 1.0 - EPS ) .LT. 1.0, * * where fl denotes the computed value. * * EMIN (output) INTEGER * The minimum exponent before (gradual) underflow occurs. * * RMIN (output) DOUBLE PRECISION * The smallest normalized number for the machine, given by * BASE**( EMIN - 1 ), where BASE is the floating point value * of BETA. * * EMAX (output) INTEGER * The maximum exponent before overflow occurs. * * RMAX (output) DOUBLE PRECISION * The largest positive number for the machine, given by * BASE**EMAX * ( 1 - EPS ), where BASE is the floating point * value of BETA. * * Further Details * =============== * * The computation of EPS is based on a routine PARANOIA by * W. Kahan of the University of California at Berkeley. * * ===================================================================== * * .. Local Scalars .. LOGICAL FIRST, IEEE, IWARN, LIEEE1, LRND INTEGER GNMIN, GPMIN, I, LBETA, LEMAX, LEMIN, LT, $ NGNMIN, NGPMIN DOUBLE PRECISION A, B, C, HALF, LEPS, LRMAX, LRMIN, ONE, RBASE, $ SIXTH, SMALL, THIRD, TWO, ZERO * .. * .. External Functions .. DOUBLE PRECISION DLAMC3 EXTERNAL DLAMC3 * .. * .. External Subroutines .. EXTERNAL DLAMC1, DLAMC4, DLAMC5 * .. * .. Intrinsic Functions .. INTRINSIC ABS, MAX, MIN * .. * .. Save statement .. SAVE FIRST, IWARN, LBETA, LEMAX, LEMIN, LEPS, LRMAX, $ LRMIN, LT * .. * .. Data statements .. DATA FIRST / .TRUE. / , IWARN / .FALSE. / * .. * .. Executable Statements .. * IF( FIRST ) THEN FIRST = .FALSE. ZERO = 0 ONE = 1 TWO = 2 * * LBETA, LT, LRND, LEPS, LEMIN and LRMIN are the local values of * BETA, T, RND, EPS, EMIN and RMIN. * * Throughout this routine we use the function DLAMC3 to ensure * that relevant values are stored and not held in registers, or * are not affected by optimizers. * * DLAMC1 returns the parameters LBETA, LT, LRND and LIEEE1. * CALL DLAMC1( LBETA, LT, LRND, LIEEE1 ) * * Start to find EPS. * B = LBETA A = B**( -LT ) LEPS = A * * Try some tricks to see whether or not this is the correct EPS. * B = TWO / 3 HALF = ONE / 2 SIXTH = DLAMC3( B, -HALF ) THIRD = DLAMC3( SIXTH, SIXTH ) B = DLAMC3( THIRD, -HALF ) B = DLAMC3( B, SIXTH ) B = ABS( B ) IF( B.LT.LEPS ) $ B = LEPS * LEPS = 1 * *+ WHILE( ( LEPS.GT.B ).AND.( B.GT.ZERO ) )LOOP 10 CONTINUE IF( ( LEPS.GT.B ) .AND. ( B.GT.ZERO ) ) THEN LEPS = B C = DLAMC3( HALF*LEPS, ( TWO**5 )*( LEPS**2 ) ) C = DLAMC3( HALF, -C ) B = DLAMC3( HALF, C ) C = DLAMC3( HALF, -B ) B = DLAMC3( HALF, C ) GO TO 10 END IF *+ END WHILE * IF( A.LT.LEPS ) $ LEPS = A * * Computation of EPS complete. * * Now find EMIN. Let A = + or - 1, and + or - (1 + BASE**(-3)). * Keep dividing A by BETA until (gradual) underflow occurs. This * is detected when we cannot recover the previous A. * RBASE = ONE / LBETA SMALL = ONE DO 20 I = 1, 3 SMALL = DLAMC3( SMALL*RBASE, ZERO ) 20 CONTINUE A = DLAMC3( ONE, SMALL ) CALL DLAMC4( NGPMIN, ONE, LBETA ) CALL DLAMC4( NGNMIN, -ONE, LBETA ) CALL DLAMC4( GPMIN, A, LBETA ) CALL DLAMC4( GNMIN, -A, LBETA ) IEEE = .FALSE. * IF( ( NGPMIN.EQ.NGNMIN ) .AND. ( GPMIN.EQ.GNMIN ) ) THEN IF( NGPMIN.EQ.GPMIN ) THEN LEMIN = NGPMIN * ( Non twos-complement machines, no gradual underflow; * e.g., VAX ) ELSE IF( ( GPMIN-NGPMIN ).EQ.3 ) THEN LEMIN = NGPMIN - 1 + LT IEEE = .TRUE. * ( Non twos-complement machines, with gradual underflow; * e.g., IEEE standard followers ) ELSE LEMIN = MIN( NGPMIN, GPMIN ) * ( A guess; no known machine ) IWARN = .TRUE. END IF * ELSE IF( ( NGPMIN.EQ.GPMIN ) .AND. ( NGNMIN.EQ.GNMIN ) ) THEN IF( ABS( NGPMIN-NGNMIN ).EQ.1 ) THEN LEMIN = MAX( NGPMIN, NGNMIN ) * ( Twos-complement machines, no gradual underflow; * e.g., CYBER 205 ) ELSE LEMIN = MIN( NGPMIN, NGNMIN ) * ( A guess; no known machine ) IWARN = .TRUE. END IF * ELSE IF( ( ABS( NGPMIN-NGNMIN ).EQ.1 ) .AND. $ ( GPMIN.EQ.GNMIN ) ) THEN IF( ( GPMIN-MIN( NGPMIN, NGNMIN ) ).EQ.3 ) THEN LEMIN = MAX( NGPMIN, NGNMIN ) - 1 + LT * ( Twos-complement machines with gradual underflow; * no known machine ) ELSE LEMIN = MIN( NGPMIN, NGNMIN ) * ( A guess; no known machine ) IWARN = .TRUE. END IF * ELSE LEMIN = MIN( NGPMIN, NGNMIN, GPMIN, GNMIN ) * ( A guess; no known machine ) IWARN = .TRUE. END IF *** * Comment out this if block if EMIN is ok IF( IWARN ) THEN FIRST = .TRUE. WRITE( 6, FMT = 9999 )LEMIN END IF *** * * Assume IEEE arithmetic if we found denormalised numbers above, * or if arithmetic seems to round in the IEEE style, determined * in routine DLAMC1. A true IEEE machine should have both things * true; however, faulty machines may have one or the other. * IEEE = IEEE .OR. LIEEE1 * * Compute RMIN by successive division by BETA. We could compute * RMIN as BASE**( EMIN - 1 ), but some machines underflow during * this computation. * LRMIN = 1 DO 30 I = 1, 1 - LEMIN LRMIN = DLAMC3( LRMIN*RBASE, ZERO ) 30 CONTINUE * * Finally, call DLAMC5 to compute EMAX and RMAX. * CALL DLAMC5( LBETA, LT, LEMIN, IEEE, LEMAX, LRMAX ) END IF * BETA = LBETA T = LT RND = LRND EPS = LEPS EMIN = LEMIN RMIN = LRMIN EMAX = LEMAX RMAX = LRMAX * RETURN * 9999 FORMAT( / / ' WARNING. The value EMIN may be incorrect:-', $ ' EMIN = ', I8, / $ ' If, after inspection, the value EMIN looks', $ ' acceptable please comment out ', $ / ' the IF block as marked within the code of routine', $ ' DLAMC2,', / ' otherwise supply EMIN explicitly.', / ) * * End of DLAMC2 * END * ************************************************************************ * DOUBLE PRECISION FUNCTION DLAMC3( A, B ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * October 31, 1992 * * .. Scalar Arguments .. DOUBLE PRECISION A, B * .. * * Purpose * ======= * * DLAMC3 is intended to force A and B to be stored prior to doing * the addition of A and B , for use in situations where optimizers * might hold one of these in a register. * * Arguments * ========= * * A, B (input) DOUBLE PRECISION * The values A and B. * * ===================================================================== * * .. Executable Statements .. * DLAMC3 = A + B * RETURN * * End of DLAMC3 * END * ************************************************************************ * SUBROUTINE DLAMC4( EMIN, START, BASE ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * October 31, 1992 * * .. Scalar Arguments .. INTEGER BASE, EMIN DOUBLE PRECISION START * .. * * Purpose * ======= * * DLAMC4 is a service routine for DLAMC2. * * Arguments * ========= * * EMIN (output) EMIN * The minimum exponent before (gradual) underflow, computed by * setting A = START and dividing by BASE until the previous A * can not be recovered. * * START (input) DOUBLE PRECISION * The starting point for determining EMIN. * * BASE (input) INTEGER * The base of the machine. * * ===================================================================== * * .. Local Scalars .. INTEGER I DOUBLE PRECISION A, B1, B2, C1, C2, D1, D2, ONE, RBASE, ZERO * .. * .. External Functions .. DOUBLE PRECISION DLAMC3 EXTERNAL DLAMC3 * .. * .. Executable Statements .. * A = START ONE = 1 RBASE = ONE / BASE ZERO = 0 EMIN = 1 B1 = DLAMC3( A*RBASE, ZERO ) C1 = A C2 = A D1 = A D2 = A *+ WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND. * $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP 10 CONTINUE IF( ( C1.EQ.A ) .AND. ( C2.EQ.A ) .AND. ( D1.EQ.A ) .AND. $ ( D2.EQ.A ) ) THEN EMIN = EMIN - 1 A = B1 B1 = DLAMC3( A / BASE, ZERO ) C1 = DLAMC3( B1*BASE, ZERO ) D1 = ZERO DO 20 I = 1, BASE D1 = D1 + B1 20 CONTINUE B2 = DLAMC3( A*RBASE, ZERO ) C2 = DLAMC3( B2 / RBASE, ZERO ) D2 = ZERO DO 30 I = 1, BASE D2 = D2 + B2 30 CONTINUE GO TO 10 END IF *+ END WHILE * RETURN * * End of DLAMC4 * END * ************************************************************************ * SUBROUTINE DLAMC5( BETA, P, EMIN, IEEE, EMAX, RMAX ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * October 31, 1992 * * .. Scalar Arguments .. LOGICAL IEEE INTEGER BETA, EMAX, EMIN, P DOUBLE PRECISION RMAX * .. * * Purpose * ======= * * DLAMC5 attempts to compute RMAX, the largest machine floating-point * number, without overflow. It assumes that EMAX + abs(EMIN) sum * approximately to a power of 2. It will fail on machines where this * assumption does not hold, for example, the Cyber 205 (EMIN = -28625, * EMAX = 28718). It will also fail if the value supplied for EMIN is * too large (i.e. too close to zero), probably with overflow. * * Arguments * ========= * * BETA (input) INTEGER * The base of floating-point arithmetic. * * P (input) INTEGER * The number of base BETA digits in the mantissa of a * floating-point value. * * EMIN (input) INTEGER * The minimum exponent before (gradual) underflow. * * IEEE (input) LOGICAL * A logical flag specifying whether or not the arithmetic * system is thought to comply with the IEEE standard. * * EMAX (output) INTEGER * The largest exponent before overflow * * RMAX (output) DOUBLE PRECISION * The largest machine floating-point number. * * ===================================================================== * * .. Parameters .. DOUBLE PRECISION ZERO, ONE PARAMETER ( ZERO = 0.0D0, ONE = 1.0D0 ) * .. * .. Local Scalars .. INTEGER EXBITS, EXPSUM, I, LEXP, NBITS, TRY, UEXP DOUBLE PRECISION OLDY, RECBAS, Y, Z * .. * .. External Functions .. DOUBLE PRECISION DLAMC3 EXTERNAL DLAMC3 * .. * .. Intrinsic Functions .. INTRINSIC MOD * .. * .. Executable Statements .. * * First compute LEXP and UEXP, two powers of 2 that bound * abs(EMIN). We then assume that EMAX + abs(EMIN) will sum * approximately to the bound that is closest to abs(EMIN). * (EMAX is the exponent of the required number RMAX). * LEXP = 1 EXBITS = 1 10 CONTINUE TRY = LEXP*2 IF( TRY.LE.( -EMIN ) ) THEN LEXP = TRY EXBITS = EXBITS + 1 GO TO 10 END IF IF( LEXP.EQ.-EMIN ) THEN UEXP = LEXP ELSE UEXP = TRY EXBITS = EXBITS + 1 END IF * * Now -LEXP is less than or equal to EMIN, and -UEXP is greater * than or equal to EMIN. EXBITS is the number of bits needed to * store the exponent. * IF( ( UEXP+EMIN ).GT.( -LEXP-EMIN ) ) THEN EXPSUM = 2*LEXP ELSE EXPSUM = 2*UEXP END IF * * EXPSUM is the exponent range, approximately equal to * EMAX - EMIN + 1 . * EMAX = EXPSUM + EMIN - 1 NBITS = 1 + EXBITS + P * * NBITS is the total number of bits needed to store a * floating-point number. * IF( ( MOD( NBITS, 2 ).EQ.1 ) .AND. ( BETA.EQ.2 ) ) THEN * * Either there are an odd number of bits used to store a * floating-point number, which is unlikely, or some bits are * not used in the representation of numbers, which is possible, * (e.g. Cray machines) or the mantissa has an implicit bit, * (e.g. IEEE machines, Dec Vax machines), which is perhaps the * most likely. We have to assume the last alternative. * If this is true, then we need to reduce EMAX by one because * there must be some way of representing zero in an implicit-bit * system. On machines like Cray, we are reducing EMAX by one * unnecessarily. * EMAX = EMAX - 1 END IF * IF( IEEE ) THEN * * Assume we are on an IEEE machine which reserves one exponent * for infinity and NaN. * EMAX = EMAX - 1 END IF * * Now create RMAX, the largest machine number, which should * be equal to (1.0 - BETA**(-P)) * BETA**EMAX . * * First compute 1.0 - BETA**(-P), being careful that the * result is less than 1.0 . * RECBAS = ONE / BETA Z = BETA - ONE Y = ZERO DO 20 I = 1, P Z = Z*RECBAS IF( Y.LT.ONE ) $ OLDY = Y Y = DLAMC3( Y, Z ) 20 CONTINUE IF( Y.GE.ONE ) $ Y = OLDY * * Now multiply by BETA**EMAX to get RMAX. * DO 30 I = 1, EMAX Y = DLAMC3( Y*BETA, ZERO ) 30 CONTINUE * RMAX = Y RETURN * * End of DLAMC5 * END SUBROUTINE DLATBS( UPLO, TRANS, DIAG, NORMIN, N, KD, AB, LDAB, X, $ SCALE, CNORM, INFO ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * June 30, 1992 * * .. Scalar Arguments .. CHARACTER DIAG, NORMIN, TRANS, UPLO INTEGER INFO, KD, LDAB, N DOUBLE PRECISION SCALE * .. * .. Array Arguments .. DOUBLE PRECISION AB( LDAB, * ), CNORM( * ), X( * ) * .. * * Purpose * ======= * * DLATBS solves one of the triangular systems * * A *x = s*b or A'*x = s*b * * with scaling to prevent overflow, where A is an upper or lower * triangular band matrix. Here A' denotes the transpose of A, x and b * are n-element vectors, and s is a scaling factor, usually less than * or equal to 1, chosen so that the components of x will be less than * the overflow threshold. If the unscaled problem will not cause * overflow, the Level 2 BLAS routine DTBSV is called. If the matrix A * is singular (A(j,j) = 0 for some j), then s is set to 0 and a * non-trivial solution to A*x = 0 is returned. * * Arguments * ========= * * UPLO (input) CHARACTER*1 * Specifies whether the matrix A is upper or lower triangular. * = 'U': Upper triangular * = 'L': Lower triangular * * TRANS (input) CHARACTER*1 * Specifies the operation applied to A. * = 'N': Solve A * x = s*b (No transpose) * = 'T': Solve A'* x = s*b (Transpose) * = 'C': Solve A'* x = s*b (Conjugate transpose = Transpose) * * DIAG (input) CHARACTER*1 * Specifies whether or not the matrix A is unit triangular. * = 'N': Non-unit triangular * = 'U': Unit triangular * * NORMIN (input) CHARACTER*1 * Specifies whether CNORM has been set or not. * = 'Y': CNORM contains the column norms on entry * = 'N': CNORM is not set on entry. On exit, the norms will * be computed and stored in CNORM. * * N (input) INTEGER * The order of the matrix A. N >= 0. * * KD (input) INTEGER * The number of subdiagonals or superdiagonals in the * triangular matrix A. KD >= 0. * * AB (input) DOUBLE PRECISION array, dimension (LDAB,N) * The upper or lower triangular band matrix A, stored in the * first KD+1 rows of the array. The j-th column of A is stored * in the j-th column of the array AB as follows: * if UPLO = 'U', AB(kd+1+i-j,j) = A(i,j) for max(1,j-kd)<=i<=j; * if UPLO = 'L', AB(1+i-j,j) = A(i,j) for j<=i<=min(n,j+kd). * * LDAB (input) INTEGER * The leading dimension of the array AB. LDAB >= KD+1. * * X (input/output) DOUBLE PRECISION array, dimension (N) * On entry, the right hand side b of the triangular system. * On exit, X is overwritten by the solution vector x. * * SCALE (output) DOUBLE PRECISION * The scaling factor s for the triangular system * A * x = s*b or A'* x = s*b. * If SCALE = 0, the matrix A is singular or badly scaled, and * the vector x is an exact or approximate solution to A*x = 0. * * CNORM (input or output) DOUBLE PRECISION array, dimension (N) * * If NORMIN = 'Y', CNORM is an input argument and CNORM(j) * contains the norm of the off-diagonal part of the j-th column * of A. If TRANS = 'N', CNORM(j) must be greater than or equal * to the infinity-norm, and if TRANS = 'T' or 'C', CNORM(j) * must be greater than or equal to the 1-norm. * * If NORMIN = 'N', CNORM is an output argument and CNORM(j) * returns the 1-norm of the offdiagonal part of the j-th column * of A. * * INFO (output) INTEGER * = 0: successful exit * < 0: if INFO = -k, the k-th argument had an illegal value * * Further Details * ======= ======= * * A rough bound on x is computed; if that is less than overflow, DTBSV * is called, otherwise, specific code is used which checks for possible * overflow or divide-by-zero at every operation. * * A columnwise scheme is used for solving A*x = b. The basic algorithm * if A is lower triangular is * * x[1:n] := b[1:n] * for j = 1, ..., n * x(j) := x(j) / A(j,j) * x[j+1:n] := x[j+1:n] - x(j) * A[j+1:n,j] * end * * Define bounds on the components of x after j iterations of the loop: * M(j) = bound on x[1:j] * G(j) = bound on x[j+1:n] * Initially, let M(0) = 0 and G(0) = max{x(i), i=1,...,n}. * * Then for iteration j+1 we have * M(j+1) <= G(j) / | A(j+1,j+1) | * G(j+1) <= G(j) + M(j+1) * | A[j+2:n,j+1] | * <= G(j) ( 1 + CNORM(j+1) / | A(j+1,j+1) | ) * * where CNORM(j+1) is greater than or equal to the infinity-norm of * column j+1 of A, not counting the diagonal. Hence * * G(j) <= G(0) product ( 1 + CNORM(i) / | A(i,i) | ) * 1<=i<=j * and * * |x(j)| <= ( G(0) / |A(j,j)| ) product ( 1 + CNORM(i) / |A(i,i)| ) * 1<=i< j * * Since |x(j)| <= M(j), we use the Level 2 BLAS routine DTBSV if the * reciprocal of the largest M(j), j=1,..,n, is larger than * max(underflow, 1/overflow). * * The bound on x(j) is also used to determine when a step in the * columnwise method can be performed without fear of overflow. If * the computed bound is greater than a large constant, x is scaled to * prevent overflow, but if the bound overflows, x is set to 0, x(j) to * 1, and scale to 0, and a non-trivial solution to A*x = 0 is found. * * Similarly, a row-wise scheme is used to solve A'*x = b. The basic * algorithm for A upper triangular is * * for j = 1, ..., n * x(j) := ( b(j) - A[1:j-1,j]' * x[1:j-1] ) / A(j,j) * end * * We simultaneously compute two bounds * G(j) = bound on ( b(i) - A[1:i-1,i]' * x[1:i-1] ), 1<=i<=j * M(j) = bound on x(i), 1<=i<=j * * The initial values are G(0) = 0, M(0) = max{b(i), i=1,..,n}, and we * add the constraint G(j) >= G(j-1) and M(j) >= M(j-1) for j >= 1. * Then the bound on x(j) is * * M(j) <= M(j-1) * ( 1 + CNORM(j) ) / | A(j,j) | * * <= M(0) * product ( ( 1 + CNORM(i) ) / |A(i,i)| ) * 1<=i<=j * * and we can safely call DTBSV if 1/M(n) and 1/G(n) are both greater * than max(underflow, 1/overflow). * * ===================================================================== * * .. Parameters .. DOUBLE PRECISION ZERO, HALF, ONE PARAMETER ( ZERO = 0.0D+0, HALF = 0.5D+0, ONE = 1.0D+0 ) * .. * .. Local Scalars .. LOGICAL NOTRAN, NOUNIT, UPPER INTEGER I, IMAX, J, JFIRST, JINC, JLAST, JLEN, MAIND DOUBLE PRECISION BIGNUM, GROW, REC, SMLNUM, SUMJ, TJJ, TJJS, $ TMAX, TSCAL, USCAL, XBND, XJ, XMAX * .. * .. External Functions .. LOGICAL LSAME INTEGER IDAMAX DOUBLE PRECISION DASUM, DDOT, DLAMCH EXTERNAL LSAME, IDAMAX, DASUM, DDOT, DLAMCH * .. * .. External Subroutines .. EXTERNAL DAXPY, DSCAL, DTBSV, XERBLA * .. * .. Intrinsic Functions .. INTRINSIC ABS, MAX, MIN * .. * .. Executable Statements .. * INFO = 0 UPPER = LSAME( UPLO, 'U' ) NOTRAN = LSAME( TRANS, 'N' ) NOUNIT = LSAME( DIAG, 'N' ) * * Test the input parameters. * IF( .NOT.UPPER .AND. .NOT.LSAME( UPLO, 'L' ) ) THEN INFO = -1 ELSE IF( .NOT.NOTRAN .AND. .NOT.LSAME( TRANS, 'T' ) .AND. .NOT. $ LSAME( TRANS, 'C' ) ) THEN INFO = -2 ELSE IF( .NOT.NOUNIT .AND. .NOT.LSAME( DIAG, 'U' ) ) THEN INFO = -3 ELSE IF( .NOT.LSAME( NORMIN, 'Y' ) .AND. .NOT. $ LSAME( NORMIN, 'N' ) ) THEN INFO = -4 ELSE IF( N.LT.0 ) THEN INFO = -5 ELSE IF( KD.LT.0 ) THEN INFO = -6 ELSE IF( LDAB.LT.KD+1 ) THEN INFO = -8 END IF IF( INFO.NE.0 ) THEN CALL XERBLA( 'DLATBS', -INFO ) RETURN END IF * * Quick return if possible * IF( N.EQ.0 ) $ RETURN * * Determine machine dependent parameters to control overflow. * SMLNUM = DLAMCH( 'Safe minimum' ) / DLAMCH( 'Precision' ) BIGNUM = ONE / SMLNUM SCALE = ONE * IF( LSAME( NORMIN, 'N' ) ) THEN * * Compute the 1-norm of each column, not including the diagonal. * IF( UPPER ) THEN * * A is upper triangular. * DO 10 J = 1, N JLEN = MIN( KD, J-1 ) CNORM( J ) = DASUM( JLEN, AB( KD+1-JLEN, J ), 1 ) 10 CONTINUE ELSE * * A is lower triangular. * DO 20 J = 1, N JLEN = MIN( KD, N-J ) IF( JLEN.GT.0 ) THEN CNORM( J ) = DASUM( JLEN, AB( 2, J ), 1 ) ELSE CNORM( J ) = ZERO END IF 20 CONTINUE END IF END IF * * Scale the column norms by TSCAL if the maximum element in CNORM is * greater than BIGNUM. * IMAX = IDAMAX( N, CNORM, 1 ) TMAX = CNORM( IMAX ) IF( TMAX.LE.BIGNUM ) THEN TSCAL = ONE ELSE TSCAL = ONE / ( SMLNUM*TMAX ) CALL DSCAL( N, TSCAL, CNORM, 1 ) END IF * * Compute a bound on the computed solution vector to see if the * Level 2 BLAS routine DTBSV can be used. * J = IDAMAX( N, X, 1 ) XMAX = ABS( X( J ) ) XBND = XMAX IF( NOTRAN ) THEN * * Compute the growth in A * x = b. * IF( UPPER ) THEN JFIRST = N JLAST = 1 JINC = -1 MAIND = KD + 1 ELSE JFIRST = 1 JLAST = N JINC = 1 MAIND = 1 END IF * IF( TSCAL.NE.ONE ) THEN GROW = ZERO GO TO 50 END IF * IF( NOUNIT ) THEN * * A is non-unit triangular. * * Compute GROW = 1/G(j) and XBND = 1/M(j). * Initially, G(0) = max{x(i), i=1,...,n}. * GROW = ONE / MAX( XBND, SMLNUM ) XBND = GROW DO 30 J = JFIRST, JLAST, JINC * * Exit the loop if the growth factor is too small. * IF( GROW.LE.SMLNUM ) $ GO TO 50 * * M(j) = G(j-1) / abs(A(j,j)) * TJJ = ABS( AB( MAIND, J ) ) XBND = MIN( XBND, MIN( ONE, TJJ )*GROW ) IF( TJJ+CNORM( J ).GE.SMLNUM ) THEN * * G(j) = G(j-1)*( 1 + CNORM(j) / abs(A(j,j)) ) * GROW = GROW*( TJJ / ( TJJ+CNORM( J ) ) ) ELSE * * G(j) could overflow, set GROW to 0. * GROW = ZERO END IF 30 CONTINUE GROW = XBND ELSE * * A is unit triangular. * * Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}. * GROW = MIN( ONE, ONE / MAX( XBND, SMLNUM ) ) DO 40 J = JFIRST, JLAST, JINC * * Exit the loop if the growth factor is too small. * IF( GROW.LE.SMLNUM ) $ GO TO 50 * * G(j) = G(j-1)*( 1 + CNORM(j) ) * GROW = GROW*( ONE / ( ONE+CNORM( J ) ) ) 40 CONTINUE END IF 50 CONTINUE * ELSE * * Compute the growth in A' * x = b. * IF( UPPER ) THEN JFIRST = 1 JLAST = N JINC = 1 MAIND = KD + 1 ELSE JFIRST = N JLAST = 1 JINC = -1 MAIND = 1 END IF * IF( TSCAL.NE.ONE ) THEN GROW = ZERO GO TO 80 END IF * IF( NOUNIT ) THEN * * A is non-unit triangular. * * Compute GROW = 1/G(j) and XBND = 1/M(j). * Initially, M(0) = max{x(i), i=1,...,n}. * GROW = ONE / MAX( XBND, SMLNUM ) XBND = GROW DO 60 J = JFIRST, JLAST, JINC * * Exit the loop if the growth factor is too small. * IF( GROW.LE.SMLNUM ) $ GO TO 80 * * G(j) = max( G(j-1), M(j-1)*( 1 + CNORM(j) ) ) * XJ = ONE + CNORM( J ) GROW = MIN( GROW, XBND / XJ ) * * M(j) = M(j-1)*( 1 + CNORM(j) ) / abs(A(j,j)) * TJJ = ABS( AB( MAIND, J ) ) IF( XJ.GT.TJJ ) $ XBND = XBND*( TJJ / XJ ) 60 CONTINUE GROW = MIN( GROW, XBND ) ELSE * * A is unit triangular. * * Compute GROW = 1/G(j), where G(0) = max{x(i), i=1,...,n}. * GROW = MIN( ONE, ONE / MAX( XBND, SMLNUM ) ) DO 70 J = JFIRST, JLAST, JINC * * Exit the loop if the growth factor is too small. * IF( GROW.LE.SMLNUM ) $ GO TO 80 * * G(j) = ( 1 + CNORM(j) )*G(j-1) * XJ = ONE + CNORM( J ) GROW = GROW / XJ 70 CONTINUE END IF 80 CONTINUE END IF * IF( ( GROW*TSCAL ).GT.SMLNUM ) THEN * * Use the Level 2 BLAS solve if the reciprocal of the bound on * elements of X is not too small. * CALL DTBSV( UPLO, TRANS, DIAG, N, KD, AB, LDAB, X, 1 ) ELSE * * Use a Level 1 BLAS solve, scaling intermediate results. * IF( XMAX.GT.BIGNUM ) THEN * * Scale X so that its components are less than or equal to * BIGNUM in absolute value. * SCALE = BIGNUM / XMAX CALL DSCAL( N, SCALE, X, 1 ) XMAX = BIGNUM END IF * IF( NOTRAN ) THEN * * Solve A * x = b * DO 110 J = JFIRST, JLAST, JINC * * Compute x(j) = b(j) / A(j,j), scaling x if necessary. * XJ = ABS( X( J ) ) IF( NOUNIT ) THEN TJJS = AB( MAIND, J )*TSCAL ELSE TJJS = TSCAL IF( TSCAL.EQ.ONE ) $ GO TO 100 END IF TJJ = ABS( TJJS ) IF( TJJ.GT.SMLNUM ) THEN * * abs(A(j,j)) > SMLNUM: * IF( TJJ.LT.ONE ) THEN IF( XJ.GT.TJJ*BIGNUM ) THEN * * Scale x by 1/b(j). * REC = ONE / XJ CALL DSCAL( N, REC, X, 1 ) SCALE = SCALE*REC XMAX = XMAX*REC END IF END IF X( J ) = X( J ) / TJJS XJ = ABS( X( J ) ) ELSE IF( TJJ.GT.ZERO ) THEN * * 0 < abs(A(j,j)) <= SMLNUM: * IF( XJ.GT.TJJ*BIGNUM ) THEN * * Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM * to avoid overflow when dividing by A(j,j). * REC = ( TJJ*BIGNUM ) / XJ IF( CNORM( J ).GT.ONE ) THEN * * Scale by 1/CNORM(j) to avoid overflow when * multiplying x(j) times column j. * REC = REC / CNORM( J ) END IF CALL DSCAL( N, REC, X, 1 ) SCALE = SCALE*REC XMAX = XMAX*REC END IF X( J ) = X( J ) / TJJS XJ = ABS( X( J ) ) ELSE * * A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and * scale = 0, and compute a solution to A*x = 0. * DO 90 I = 1, N X( I ) = ZERO 90 CONTINUE X( J ) = ONE XJ = ONE SCALE = ZERO XMAX = ZERO END IF 100 CONTINUE * * Scale x if necessary to avoid overflow when adding a * multiple of column j of A. * IF( XJ.GT.ONE ) THEN REC = ONE / XJ IF( CNORM( J ).GT.( BIGNUM-XMAX )*REC ) THEN * * Scale x by 1/(2*abs(x(j))). * REC = REC*HALF CALL DSCAL( N, REC, X, 1 ) SCALE = SCALE*REC END IF ELSE IF( XJ*CNORM( J ).GT.( BIGNUM-XMAX ) ) THEN * * Scale x by 1/2. * CALL DSCAL( N, HALF, X, 1 ) SCALE = SCALE*HALF END IF * IF( UPPER ) THEN IF( J.GT.1 ) THEN * * Compute the update * x(max(1,j-kd):j-1) := x(max(1,j-kd):j-1) - * x(j)* A(max(1,j-kd):j-1,j) * JLEN = MIN( KD, J-1 ) CALL DAXPY( JLEN, -X( J )*TSCAL, $ AB( KD+1-JLEN, J ), 1, X( J-JLEN ), 1 ) I = IDAMAX( J-1, X, 1 ) XMAX = ABS( X( I ) ) END IF ELSE IF( J.LT.N ) THEN * * Compute the update * x(j+1:min(j+kd,n)) := x(j+1:min(j+kd,n)) - * x(j) * A(j+1:min(j+kd,n),j) * JLEN = MIN( KD, N-J ) IF( JLEN.GT.0 ) $ CALL DAXPY( JLEN, -X( J )*TSCAL, AB( 2, J ), 1, $ X( J+1 ), 1 ) I = J + IDAMAX( N-J, X( J+1 ), 1 ) XMAX = ABS( X( I ) ) END IF 110 CONTINUE * ELSE * * Solve A' * x = b * DO 160 J = JFIRST, JLAST, JINC * * Compute x(j) = b(j) - sum A(k,j)*x(k). * k<>j * XJ = ABS( X( J ) ) USCAL = TSCAL REC = ONE / MAX( XMAX, ONE ) IF( CNORM( J ).GT.( BIGNUM-XJ )*REC ) THEN * * If x(j) could overflow, scale x by 1/(2*XMAX). * REC = REC*HALF IF( NOUNIT ) THEN TJJS = AB( MAIND, J )*TSCAL ELSE TJJS = TSCAL END IF TJJ = ABS( TJJS ) IF( TJJ.GT.ONE ) THEN * * Divide by A(j,j) when scaling x if A(j,j) > 1. * REC = MIN( ONE, REC*TJJ ) USCAL = USCAL / TJJS END IF IF( REC.LT.ONE ) THEN CALL DSCAL( N, REC, X, 1 ) SCALE = SCALE*REC XMAX = XMAX*REC END IF END IF * SUMJ = ZERO IF( USCAL.EQ.ONE ) THEN * * If the scaling needed for A in the dot product is 1, * call DDOT to perform the dot product. * IF( UPPER ) THEN JLEN = MIN( KD, J-1 ) SUMJ = DDOT( JLEN, AB( KD+1-JLEN, J ), 1, $ X( J-JLEN ), 1 ) ELSE JLEN = MIN( KD, N-J ) IF( JLEN.GT.0 ) $ SUMJ = DDOT( JLEN, AB( 2, J ), 1, X( J+1 ), 1 ) END IF ELSE * * Otherwise, use in-line code for the dot product. * IF( UPPER ) THEN JLEN = MIN( KD, J-1 ) DO 120 I = 1, JLEN SUMJ = SUMJ + ( AB( KD+I-JLEN, J )*USCAL )* $ X( J-JLEN-1+I ) 120 CONTINUE ELSE JLEN = MIN( KD, N-J ) DO 130 I = 1, JLEN SUMJ = SUMJ + ( AB( I+1, J )*USCAL )*X( J+I ) 130 CONTINUE END IF END IF * IF( USCAL.EQ.TSCAL ) THEN * * Compute x(j) := ( x(j) - sumj ) / A(j,j) if 1/A(j,j) * was not used to scale the dotproduct. * X( J ) = X( J ) - SUMJ XJ = ABS( X( J ) ) IF( NOUNIT ) THEN * * Compute x(j) = x(j) / A(j,j), scaling if necessary. * TJJS = AB( MAIND, J )*TSCAL ELSE TJJS = TSCAL IF( TSCAL.EQ.ONE ) $ GO TO 150 END IF TJJ = ABS( TJJS ) IF( TJJ.GT.SMLNUM ) THEN * * abs(A(j,j)) > SMLNUM: * IF( TJJ.LT.ONE ) THEN IF( XJ.GT.TJJ*BIGNUM ) THEN * * Scale X by 1/abs(x(j)). * REC = ONE / XJ CALL DSCAL( N, REC, X, 1 ) SCALE = SCALE*REC XMAX = XMAX*REC END IF END IF X( J ) = X( J ) / TJJS ELSE IF( TJJ.GT.ZERO ) THEN * * 0 < abs(A(j,j)) <= SMLNUM: * IF( XJ.GT.TJJ*BIGNUM ) THEN * * Scale x by (1/abs(x(j)))*abs(A(j,j))*BIGNUM. * REC = ( TJJ*BIGNUM ) / XJ CALL DSCAL( N, REC, X, 1 ) SCALE = SCALE*REC XMAX = XMAX*REC END IF X( J ) = X( J ) / TJJS ELSE * * A(j,j) = 0: Set x(1:n) = 0, x(j) = 1, and * scale = 0, and compute a solution to A'*x = 0. * DO 140 I = 1, N X( I ) = ZERO 140 CONTINUE X( J ) = ONE SCALE = ZERO XMAX = ZERO END IF 150 CONTINUE ELSE * * Compute x(j) := x(j) / A(j,j) - sumj if the dot * product has already been divided by 1/A(j,j). * X( J ) = X( J ) / TJJS - SUMJ END IF XMAX = MAX( XMAX, ABS( X( J ) ) ) 160 CONTINUE END IF SCALE = SCALE / TSCAL END IF * * Scale the column norms by 1/TSCAL for return. * IF( TSCAL.NE.ONE ) THEN CALL DSCAL( N, ONE / TSCAL, CNORM, 1 ) END IF * RETURN * * End of DLATBS * END SUBROUTINE DRSCL( N, SA, SX, INCX ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * September 30, 1994 * * .. Scalar Arguments .. INTEGER INCX, N DOUBLE PRECISION SA * .. * .. Array Arguments .. DOUBLE PRECISION SX( * ) * .. * * Purpose * ======= * * DRSCL multiplies an n-element real vector x by the real scalar 1/a. * This is done without overflow or underflow as long as * the final result x/a does not overflow or underflow. * * Arguments * ========= * * N (input) INTEGER * The number of components of the vector x. * * SA (input) DOUBLE PRECISION * The scalar a which is used to divide each component of x. * SA must be >= 0, or the subroutine will divide by zero. * * SX (input/output) DOUBLE PRECISION array, dimension * (1+(N-1)*abs(INCX)) * The n-element vector x. * * INCX (input) INTEGER * The increment between successive values of the vector SX. * > 0: SX(1) = X(1) and SX(1+(i-1)*INCX) = x(i), 1< i<= n * * ===================================================================== * * .. Parameters .. DOUBLE PRECISION ONE, ZERO PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 ) * .. * .. Local Scalars .. LOGICAL DONE DOUBLE PRECISION BIGNUM, CDEN, CDEN1, CNUM, CNUM1, MUL, SMLNUM * .. * .. External Functions .. DOUBLE PRECISION DLAMCH EXTERNAL DLAMCH * .. * .. External Subroutines .. EXTERNAL DSCAL * .. * .. Intrinsic Functions .. INTRINSIC ABS * .. * .. Executable Statements .. * * Quick return if possible * IF( N.LE.0 ) $ RETURN * * Get machine parameters * SMLNUM = DLAMCH( 'S' ) BIGNUM = ONE / SMLNUM CALL DLABAD( SMLNUM, BIGNUM ) * * Initialize the denominator to SA and the numerator to 1. * CDEN = SA CNUM = ONE * 10 CONTINUE CDEN1 = CDEN*SMLNUM CNUM1 = CNUM / BIGNUM IF( ABS( CDEN1 ).GT.ABS( CNUM ) .AND. CNUM.NE.ZERO ) THEN * * Pre-multiply X by SMLNUM if CDEN is large compared to CNUM. * MUL = SMLNUM DONE = .FALSE. CDEN = CDEN1 ELSE IF( ABS( CNUM1 ).GT.ABS( CDEN ) ) THEN * * Pre-multiply X by BIGNUM if CDEN is small compared to CNUM. * MUL = BIGNUM DONE = .FALSE. CNUM = CNUM1 ELSE * * Multiply X by CNUM / CDEN and return. * MUL = CNUM / CDEN DONE = .TRUE. END IF * * Scale the vector X by MUL * CALL DSCAL( N, MUL, SX, INCX ) * IF( .NOT.DONE ) $ GO TO 10 * RETURN * * End of DRSCL * END INTEGER FUNCTION IEEECK( ISPEC, ZERO, ONE ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * June 30, 1998 * * .. Scalar Arguments .. INTEGER ISPEC REAL ONE, ZERO * .. * * Purpose * ======= * * IEEECK is called from the ILAENV to verify that Infinity and * possibly NaN arithmetic is safe (i.e. will not trap). * * Arguments * ========= * * ISPEC (input) INTEGER * Specifies whether to test just for inifinity arithmetic * or whether to test for infinity and NaN arithmetic. * = 0: Verify infinity arithmetic only. * = 1: Verify infinity and NaN arithmetic. * * ZERO (input) REAL * Must contain the value 0.0 * This is passed to prevent the compiler from optimizing * away this code. * * ONE (input) REAL * Must contain the value 1.0 * This is passed to prevent the compiler from optimizing * away this code. * * RETURN VALUE: INTEGER * = 0: Arithmetic failed to produce the correct answers * = 1: Arithmetic produced the correct answers * * .. Local Scalars .. REAL NAN1, NAN2, NAN3, NAN4, NAN5, NAN6, NEGINF, $ NEGZRO, NEWZRO, POSINF * .. * .. Executable Statements .. IEEECK = 1 * POSINF = ONE / ZERO IF( POSINF.LE.ONE ) THEN IEEECK = 0 RETURN END IF * NEGINF = -ONE / ZERO IF( NEGINF.GE.ZERO ) THEN IEEECK = 0 RETURN END IF * NEGZRO = ONE / ( NEGINF+ONE ) IF( NEGZRO.NE.ZERO ) THEN IEEECK = 0 RETURN END IF * NEGINF = ONE / NEGZRO IF( NEGINF.GE.ZERO ) THEN IEEECK = 0 RETURN END IF * NEWZRO = NEGZRO + ZERO IF( NEWZRO.NE.ZERO ) THEN IEEECK = 0 RETURN END IF * POSINF = ONE / NEWZRO IF( POSINF.LE.ONE ) THEN IEEECK = 0 RETURN END IF * NEGINF = NEGINF*POSINF IF( NEGINF.GE.ZERO ) THEN IEEECK = 0 RETURN END IF * POSINF = POSINF*POSINF IF( POSINF.LE.ONE ) THEN IEEECK = 0 RETURN END IF * * * * * Return if we were only asked to check infinity arithmetic * IF( ISPEC.EQ.0 ) $ RETURN * NAN1 = POSINF + NEGINF * NAN2 = POSINF / NEGINF * NAN3 = POSINF / POSINF * NAN4 = POSINF*ZERO * NAN5 = NEGINF*NEGZRO * NAN6 = NAN5*0.0 * IF( NAN1.EQ.NAN1 ) THEN IEEECK = 0 RETURN END IF * IF( NAN2.EQ.NAN2 ) THEN IEEECK = 0 RETURN END IF * IF( NAN3.EQ.NAN3 ) THEN IEEECK = 0 RETURN END IF * IF( NAN4.EQ.NAN4 ) THEN IEEECK = 0 RETURN END IF * IF( NAN5.EQ.NAN5 ) THEN IEEECK = 0 RETURN END IF * IF( NAN6.EQ.NAN6 ) THEN IEEECK = 0 RETURN END IF * RETURN END INTEGER FUNCTION ILAENV( ISPEC, NAME, OPTS, N1, N2, N3, $ N4 ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * June 30, 1999 * * .. Scalar Arguments .. CHARACTER*( * ) NAME, OPTS INTEGER ISPEC, N1, N2, N3, N4 * .. * * Purpose * ======= * * ILAENV is called from the LAPACK routines to choose problem-dependent * parameters for the local environment. See ISPEC for a description of * the parameters. * * This version provides a set of parameters which should give good, * but not optimal, performance on many of the currently available * computers. Users are encouraged to modify this subroutine to set * the tuning parameters for their particular machine using the option * and problem size information in the arguments. * * This routine will not function correctly if it is converted to all * lower case. Converting it to all upper case is allowed. * * Arguments * ========= * * ISPEC (input) INTEGER * Specifies the parameter to be returned as the value of * ILAENV. * = 1: the optimal blocksize; if this value is 1, an unblocked * algorithm will give the best performance. * = 2: the minimum block size for which the block routine * should be used; if the usable block size is less than * this value, an unblocked routine should be used. * = 3: the crossover point (in a block routine, for N less * than this value, an unblocked routine should be used) * = 4: the number of shifts, used in the nonsymmetric * eigenvalue routines * = 5: the minimum column dimension for blocking to be used; * rectangular blocks must have dimension at least k by m, * where k is given by ILAENV(2,...) and m by ILAENV(5,...) * = 6: the crossover point for the SVD (when reducing an m by n * matrix to bidiagonal form, if max(m,n)/min(m,n) exceeds * this value, a QR factorization is used first to reduce * the matrix to a triangular form.) * = 7: the number of processors * = 8: the crossover point for the multishift QR and QZ methods * for nonsymmetric eigenvalue problems. * = 9: maximum size of the subproblems at the bottom of the * computation tree in the divide-and-conquer algorithm * (used by xGELSD and xGESDD) * =10: ieee NaN arithmetic can be trusted not to trap * =11: infinity arithmetic can be trusted not to trap * * NAME (input) CHARACTER*(*) * The name of the calling subroutine, in either upper case or * lower case. * * OPTS (input) CHARACTER*(*) * The character options to the subroutine NAME, concatenated * into a single character string. For example, UPLO = 'U', * TRANS = 'T', and DIAG = 'N' for a triangular routine would * be specified as OPTS = 'UTN'. * * N1 (input) INTEGER * N2 (input) INTEGER * N3 (input) INTEGER * N4 (input) INTEGER * Problem dimensions for the subroutine NAME; these may not all * be required. * * (ILAENV) (output) INTEGER * >= 0: the value of the parameter specified by ISPEC * < 0: if ILAENV = -k, the k-th argument had an illegal value. * * Further Details * =============== * * The following conventions have been used when calling ILAENV from the * LAPACK routines: * 1) OPTS is a concatenation of all of the character options to * subroutine NAME, in the same order that they appear in the * argument list for NAME, even if they are not used in determining * the value of the parameter specified by ISPEC. * 2) The problem dimensions N1, N2, N3, N4 are specified in the order * that they appear in the argument list for NAME. N1 is used * first, N2 second, and so on, and unused problem dimensions are * passed a value of -1. * 3) The parameter value returned by ILAENV is checked for validity in * the calling subroutine. For example, ILAENV is used to retrieve * the optimal blocksize for STRTRI as follows: * * NB = ILAENV( 1, 'STRTRI', UPLO // DIAG, N, -1, -1, -1 ) * IF( NB.LE.1 ) NB = MAX( 1, N ) * * ===================================================================== * * .. Local Scalars .. LOGICAL CNAME, SNAME CHARACTER*1 C1 CHARACTER*2 C2, C4 CHARACTER*3 C3 CHARACTER*6 SUBNAM INTEGER I, IC, IZ, NB, NBMIN, NX * .. * .. Intrinsic Functions .. INTRINSIC CHAR, ICHAR, INT, MIN, REAL * .. * .. External Functions .. INTEGER IEEECK EXTERNAL IEEECK * .. * .. Executable Statements .. * GO TO ( 100, 100, 100, 400, 500, 600, 700, 800, 900, 1000, $ 1100 ) ISPEC * * Invalid value for ISPEC * ILAENV = -1 RETURN * 100 CONTINUE * * Convert NAME to upper case if the first character is lower case. * ILAENV = 1 SUBNAM = NAME IC = ICHAR( SUBNAM( 1:1 ) ) IZ = ICHAR( 'Z' ) IF( IZ.EQ.90 .OR. IZ.EQ.122 ) THEN * * ASCII character set * IF( IC.GE.97 .AND. IC.LE.122 ) THEN SUBNAM( 1:1 ) = CHAR( IC-32 ) DO 10 I = 2, 6 IC = ICHAR( SUBNAM( I:I ) ) IF( IC.GE.97 .AND. IC.LE.122 ) $ SUBNAM( I:I ) = CHAR( IC-32 ) 10 CONTINUE END IF * ELSE IF( IZ.EQ.233 .OR. IZ.EQ.169 ) THEN * * EBCDIC character set * IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR. $ ( IC.GE.145 .AND. IC.LE.153 ) .OR. $ ( IC.GE.162 .AND. IC.LE.169 ) ) THEN SUBNAM( 1:1 ) = CHAR( IC+64 ) DO 20 I = 2, 6 IC = ICHAR( SUBNAM( I:I ) ) IF( ( IC.GE.129 .AND. IC.LE.137 ) .OR. $ ( IC.GE.145 .AND. IC.LE.153 ) .OR. $ ( IC.GE.162 .AND. IC.LE.169 ) ) $ SUBNAM( I:I ) = CHAR( IC+64 ) 20 CONTINUE END IF * ELSE IF( IZ.EQ.218 .OR. IZ.EQ.250 ) THEN * * Prime machines: ASCII+128 * IF( IC.GE.225 .AND. IC.LE.250 ) THEN SUBNAM( 1:1 ) = CHAR( IC-32 ) DO 30 I = 2, 6 IC = ICHAR( SUBNAM( I:I ) ) IF( IC.GE.225 .AND. IC.LE.250 ) $ SUBNAM( I:I ) = CHAR( IC-32 ) 30 CONTINUE END IF END IF * C1 = SUBNAM( 1:1 ) SNAME = C1.EQ.'S' .OR. C1.EQ.'D' CNAME = C1.EQ.'C' .OR. C1.EQ.'Z' IF( .NOT.( CNAME .OR. SNAME ) ) $ RETURN C2 = SUBNAM( 2:3 ) C3 = SUBNAM( 4:6 ) C4 = C3( 2:3 ) * GO TO ( 110, 200, 300 ) ISPEC * 110 CONTINUE * * ISPEC = 1: block size * * In these examples, separate code is provided for setting NB for * real and complex. We assume that NB will take the same value in * single or double precision. * NB = 1 * IF( C2.EQ.'GE' ) THEN IF( C3.EQ.'TRF' ) THEN IF( SNAME ) THEN NB = 64 ELSE NB = 64 END IF ELSE IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR. $ C3.EQ.'QLF' ) THEN IF( SNAME ) THEN NB = 32 ELSE NB = 32 END IF ELSE IF( C3.EQ.'HRD' ) THEN IF( SNAME ) THEN NB = 32 ELSE NB = 32 END IF ELSE IF( C3.EQ.'BRD' ) THEN IF( SNAME ) THEN NB = 32 ELSE NB = 32 END IF ELSE IF( C3.EQ.'TRI' ) THEN IF( SNAME ) THEN NB = 64 ELSE NB = 64 END IF END IF ELSE IF( C2.EQ.'PO' ) THEN IF( C3.EQ.'TRF' ) THEN IF( SNAME ) THEN NB = 64 ELSE NB = 64 END IF END IF ELSE IF( C2.EQ.'SY' ) THEN IF( C3.EQ.'TRF' ) THEN IF( SNAME ) THEN NB = 64 ELSE NB = 64 END IF ELSE IF( SNAME .AND. C3.EQ.'TRD' ) THEN NB = 32 ELSE IF( SNAME .AND. C3.EQ.'GST' ) THEN NB = 64 END IF ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN IF( C3.EQ.'TRF' ) THEN NB = 64 ELSE IF( C3.EQ.'TRD' ) THEN NB = 32 ELSE IF( C3.EQ.'GST' ) THEN NB = 64 END IF ELSE IF( SNAME .AND. C2.EQ.'OR' ) THEN IF( C3( 1:1 ).EQ.'G' ) THEN IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. $ C4.EQ.'BR' ) THEN NB = 32 END IF ELSE IF( C3( 1:1 ).EQ.'M' ) THEN IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. $ C4.EQ.'BR' ) THEN NB = 32 END IF END IF ELSE IF( CNAME .AND. C2.EQ.'UN' ) THEN IF( C3( 1:1 ).EQ.'G' ) THEN IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. $ C4.EQ.'BR' ) THEN NB = 32 END IF ELSE IF( C3( 1:1 ).EQ.'M' ) THEN IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. $ C4.EQ.'BR' ) THEN NB = 32 END IF END IF ELSE IF( C2.EQ.'GB' ) THEN IF( C3.EQ.'TRF' ) THEN IF( SNAME ) THEN IF( N4.LE.64 ) THEN NB = 1 ELSE NB = 32 END IF ELSE IF( N4.LE.64 ) THEN NB = 1 ELSE NB = 32 END IF END IF END IF ELSE IF( C2.EQ.'PB' ) THEN IF( C3.EQ.'TRF' ) THEN IF( SNAME ) THEN IF( N2.LE.64 ) THEN NB = 1 ELSE NB = 32 END IF ELSE IF( N2.LE.64 ) THEN NB = 1 ELSE NB = 32 END IF END IF END IF ELSE IF( C2.EQ.'TR' ) THEN IF( C3.EQ.'TRI' ) THEN IF( SNAME ) THEN NB = 64 ELSE NB = 64 END IF END IF ELSE IF( C2.EQ.'LA' ) THEN IF( C3.EQ.'UUM' ) THEN IF( SNAME ) THEN NB = 64 ELSE NB = 64 END IF END IF ELSE IF( SNAME .AND. C2.EQ.'ST' ) THEN IF( C3.EQ.'EBZ' ) THEN NB = 1 END IF END IF ILAENV = NB RETURN * 200 CONTINUE * * ISPEC = 2: minimum block size * NBMIN = 2 IF( C2.EQ.'GE' ) THEN IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR. $ C3.EQ.'QLF' ) THEN IF( SNAME ) THEN NBMIN = 2 ELSE NBMIN = 2 END IF ELSE IF( C3.EQ.'HRD' ) THEN IF( SNAME ) THEN NBMIN = 2 ELSE NBMIN = 2 END IF ELSE IF( C3.EQ.'BRD' ) THEN IF( SNAME ) THEN NBMIN = 2 ELSE NBMIN = 2 END IF ELSE IF( C3.EQ.'TRI' ) THEN IF( SNAME ) THEN NBMIN = 2 ELSE NBMIN = 2 END IF END IF ELSE IF( C2.EQ.'SY' ) THEN IF( C3.EQ.'TRF' ) THEN IF( SNAME ) THEN NBMIN = 8 ELSE NBMIN = 8 END IF ELSE IF( SNAME .AND. C3.EQ.'TRD' ) THEN NBMIN = 2 END IF ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN IF( C3.EQ.'TRD' ) THEN NBMIN = 2 END IF ELSE IF( SNAME .AND. C2.EQ.'OR' ) THEN IF( C3( 1:1 ).EQ.'G' ) THEN IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. $ C4.EQ.'BR' ) THEN NBMIN = 2 END IF ELSE IF( C3( 1:1 ).EQ.'M' ) THEN IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. $ C4.EQ.'BR' ) THEN NBMIN = 2 END IF END IF ELSE IF( CNAME .AND. C2.EQ.'UN' ) THEN IF( C3( 1:1 ).EQ.'G' ) THEN IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. $ C4.EQ.'BR' ) THEN NBMIN = 2 END IF ELSE IF( C3( 1:1 ).EQ.'M' ) THEN IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. $ C4.EQ.'BR' ) THEN NBMIN = 2 END IF END IF END IF ILAENV = NBMIN RETURN * 300 CONTINUE * * ISPEC = 3: crossover point * NX = 0 IF( C2.EQ.'GE' ) THEN IF( C3.EQ.'QRF' .OR. C3.EQ.'RQF' .OR. C3.EQ.'LQF' .OR. $ C3.EQ.'QLF' ) THEN IF( SNAME ) THEN NX = 128 ELSE NX = 128 END IF ELSE IF( C3.EQ.'HRD' ) THEN IF( SNAME ) THEN NX = 128 ELSE NX = 128 END IF ELSE IF( C3.EQ.'BRD' ) THEN IF( SNAME ) THEN NX = 128 ELSE NX = 128 END IF END IF ELSE IF( C2.EQ.'SY' ) THEN IF( SNAME .AND. C3.EQ.'TRD' ) THEN NX = 32 END IF ELSE IF( CNAME .AND. C2.EQ.'HE' ) THEN IF( C3.EQ.'TRD' ) THEN NX = 32 END IF ELSE IF( SNAME .AND. C2.EQ.'OR' ) THEN IF( C3( 1:1 ).EQ.'G' ) THEN IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. $ C4.EQ.'BR' ) THEN NX = 128 END IF END IF ELSE IF( CNAME .AND. C2.EQ.'UN' ) THEN IF( C3( 1:1 ).EQ.'G' ) THEN IF( C4.EQ.'QR' .OR. C4.EQ.'RQ' .OR. C4.EQ.'LQ' .OR. $ C4.EQ.'QL' .OR. C4.EQ.'HR' .OR. C4.EQ.'TR' .OR. $ C4.EQ.'BR' ) THEN NX = 128 END IF END IF END IF ILAENV = NX RETURN * 400 CONTINUE * * ISPEC = 4: number of shifts (used by xHSEQR) * ILAENV = 6 RETURN * 500 CONTINUE * * ISPEC = 5: minimum column dimension (not used) * ILAENV = 2 RETURN * 600 CONTINUE * * ISPEC = 6: crossover point for SVD (used by xGELSS and xGESVD) * ILAENV = INT( REAL( MIN( N1, N2 ) )*1.6E0 ) RETURN * 700 CONTINUE * * ISPEC = 7: number of processors (not used) * ILAENV = 1 RETURN * 800 CONTINUE * * ISPEC = 8: crossover point for multishift (used by xHSEQR) * ILAENV = 50 RETURN * 900 CONTINUE * * ISPEC = 9: maximum size of the subproblems at the bottom of the * computation tree in the divide-and-conquer algorithm * (used by xGELSD and xGESDD) * ILAENV = 25 RETURN * 1000 CONTINUE * * ISPEC = 10: ieee NaN arithmetic can be trusted not to trap * C ILAENV = 0 ILAENV = 1 IF( ILAENV.EQ.1 ) THEN ILAENV = IEEECK( 0, 0.0, 1.0 ) END IF RETURN * 1100 CONTINUE * * ISPEC = 11: infinity arithmetic can be trusted not to trap * C ILAENV = 0 ILAENV = 1 IF( ILAENV.EQ.1 ) THEN ILAENV = IEEECK( 1, 0.0, 1.0 ) END IF RETURN * * End of ILAENV * END LOGICAL FUNCTION LSAME( CA, CB ) * * -- LAPACK auxiliary routine (version 2.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * January 31, 1994 * * .. Scalar Arguments .. CHARACTER CA, CB * .. * * Purpose * ======= * * LSAME returns .TRUE. if CA is the same letter as CB regardless of * case. * * Arguments * ========= * * CA (input) CHARACTER*1 * CB (input) CHARACTER*1 * CA and CB specify the single characters to be compared. * * ===================================================================== * * .. Intrinsic Functions .. INTRINSIC ICHAR * .. * .. Local Scalars .. INTEGER INTA, INTB, ZCODE * .. * .. Executable Statements .. * * Test if the characters are equal * LSAME = CA.EQ.CB IF( LSAME ) $ RETURN * * Now test for equivalence if both characters are alphabetic. * ZCODE = ICHAR( 'Z' ) * * Use 'Z' rather than 'A' so that ASCII can be detected on Prime * machines, on which ICHAR returns a value with bit 8 set. * ICHAR('A') on Prime machines returns 193 which is the same as * ICHAR('A') on an EBCDIC machine. * INTA = ICHAR( CA ) INTB = ICHAR( CB ) * IF( ZCODE.EQ.90 .OR. ZCODE.EQ.122 ) THEN * * ASCII is assumed - ZCODE is the ASCII code of either lower or * upper case 'Z'. * IF( INTA.GE.97 .AND. INTA.LE.122 ) INTA = INTA - 32 IF( INTB.GE.97 .AND. INTB.LE.122 ) INTB = INTB - 32 * ELSE IF( ZCODE.EQ.233 .OR. ZCODE.EQ.169 ) THEN * * EBCDIC is assumed - ZCODE is the EBCDIC code of either lower or * upper case 'Z'. * IF( INTA.GE.129 .AND. INTA.LE.137 .OR. $ INTA.GE.145 .AND. INTA.LE.153 .OR. $ INTA.GE.162 .AND. INTA.LE.169 ) INTA = INTA + 64 IF( INTB.GE.129 .AND. INTB.LE.137 .OR. $ INTB.GE.145 .AND. INTB.LE.153 .OR. $ INTB.GE.162 .AND. INTB.LE.169 ) INTB = INTB + 64 * ELSE IF( ZCODE.EQ.218 .OR. ZCODE.EQ.250 ) THEN * * ASCII is assumed, on Prime machines - ZCODE is the ASCII code * plus 128 of either lower or upper case 'Z'. * IF( INTA.GE.225 .AND. INTA.LE.250 ) INTA = INTA - 32 IF( INTB.GE.225 .AND. INTB.LE.250 ) INTB = INTB - 32 END IF LSAME = INTA.EQ.INTB * * RETURN * * End of LSAME * END SUBROUTINE XERBLA( SRNAME, INFO ) * * -- LAPACK auxiliary routine (version 3.0) -- * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., * Courant Institute, Argonne National Lab, and Rice University * September 30, 1994 * * .. Scalar Arguments .. CHARACTER*6 SRNAME INTEGER INFO * .. * * Purpose * ======= * * XERBLA is an error handler for the LAPACK routines. * It is called by an LAPACK routine if an input parameter has an * invalid value. A message is printed and execution stops. * * Installers may consider modifying the STOP statement in order to * call system-specific exception-handling facilities. * * Arguments * ========= * * SRNAME (input) CHARACTER*6 * The name of the routine which called XERBLA. * * INFO (input) INTEGER * The position of the invalid parameter in the parameter list * of the calling routine. * * ===================================================================== * * .. Executable Statements .. * WRITE( *, FMT = 9999 )SRNAME, INFO * STOP * 9999 FORMAT( ' ** On entry to ', A6, ' parameter number ', I2, ' had ', $ 'an illegal value' ) * * End of XERBLA * END SHAR_EOF fi # end of overwriting check if test -f 'res1' then echo shar: will not over-write existing file "'res1'" else cat << "SHAR_EOF" > 'res1' 241 0.000000000000000D+00 0.565126291685656D-01 0.112979133090506D+00 0.169353597197309D+00 0.225590526286864D+00 0.281645049262207D+00 0.337473118020501D+00 0.393031698679646D+00 0.448278953443574D+00 0.503174411544615D+00 0.557679127859181D+00 0.611755827968119D+00 0.665369038621719D+00 0.718485202767671D+00 0.771072778504368D+00 0.823102321527859D+00 0.874546550844865D+00 0.925380397722897D+00 0.975581038038567D+00 0.102512790836374D+01 0.107400270629385D+01 0.112218937567146D+01 0.116967407748968D+01 0.121644514737318D+01 0.126249304062844D+01 0.130781026593046D+01 0.135239130876911D+01 0.139623254581696D+01 0.143933215140121D+01 0.148168999726789D+01 0.152330754681667D+01 0.156418774496260D+01 0.160433490474686D+01 0.164375459177506D+01 0.168245350750990D+01 0.172043937238641D+01 0.175772080965484D+01 0.179430723078962D+01 0.183020872323346D+01 0.186543594117636D+01 0.190000000000000D+01 0.193391251197856D+01 0.196714255609637D+01 0.199966449624706D+01 0.203145751247149D+01 0.206250523155520D+01 0.209279533747276D+01 0.212231917338843D+01 0.215107134519654D+01 0.217904933482899D+01 0.220625312984182D+01 0.223268487417561D+01 0.225834854350459D+01 0.228324964727619D+01 0.230739495841111D+01 0.233079227069213D+01 0.235345018311373D+01 0.237537790988904D+01 0.239658511439957D+01 0.241708176511263D+01 0.243687801135960D+01 0.245598407684624D+01 0.247441016883109D+01 0.249216640103943D+01 0.250926272855664D+01 0.252570889314793D+01 0.254151437766318D+01 0.255668836839186D+01 0.257123972442042D+01 0.258517695320500D+01 0.259850819169730D+01 0.261124119244934D+01 0.262338331417066D+01 0.263494151622298D+01 0.264592235651453D+01 0.265633199220706D+01 0.266617618257897D+01 0.267546029330813D+01 0.268418930135615D+01 0.269236779956246D+01 0.270000000000000D+01 0.270708967620911D+01 0.271364628720529D+01 0.271967837109672D+01 0.272519364613680D+01 0.273019905091193D+01 0.273470078408332D+01 0.273870434431968D+01 0.274221457073475D+01 0.274523568385611D+01 0.274777132690532D+01 0.274982460696665D+01 0.275139813546524D+01 0.275249406726576D+01 0.275311413764016D+01 0.275325969633513D+01 0.275293173799432D+01 0.275213092825374D+01 0.275085762492497D+01 0.274911189380588D+01 0.274689351880511D+01 0.274420200622807D+01 0.274103658324267D+01 0.273739619071353D+01 0.273327947075883D+01 0.272868474953587D+01 0.272361001589492D+01 0.271805289664839D+01 0.271201062928085D+01 0.270548003296840D+01 0.269845747878259D+01 0.269093885992020D+01 0.268291956272674D+01 0.267439443916756D+01 0.266535778124843D+01 0.265580329770040D+01 0.264572409302472D+01 0.263511264874956D+01 0.262396080648616D+01 0.261225975209595D+01 0.260000000000000D+01 0.258717141036682D+01 0.257376792767460D+01 0.255978328460679D+01 0.254521098598963D+01 0.253004432280479D+01 0.251427638279360D+01 0.249790006020656D+01 0.248090806783935D+01 0.246329295493768D+01 0.244504713482364D+01 0.242616292617672D+01 0.240663261178360D+01 0.238644851824980D+01 0.236560311964922D+01 0.234408916738858D+01 0.232189984770315D+01 0.229902896720613D+01 0.227547116581844D+01 0.225122215524667D+01 0.222627897999320D+01 0.220064029671700D+01 0.217430666665807D+01 0.214728085483466D+01 0.211956812886084D+01 0.209117654955031D+01 0.206211724500469D+01 0.203240465966059D+01 0.200205676981358D+01 0.197109525746480D+01 0.193954563495634D+01 0.190743731377151D+01 0.187480361206357D+01 0.184168169691459D+01 0.180811245897788D+01 0.177414031897212D+01 0.173981296741164D+01 0.170518104090651D+01 0.167029774027158D+01 0.163521839746919D+01 0.160000000000000D+01 0.156470069466857D+01 0.152945730277189D+01 0.149440524911607D+01 0.145967581331255D+01 0.142539360017907D+01 0.139167432669439D+01 0.135862301227630D+01 0.132633263191630D+01 0.129488326212161D+01 0.126434172015843D+01 0.123476166998791D+01 0.120618414531543D+01 0.117863842255353D+01 0.115214316485431D+01 0.112670775278747D+01 0.110233371736543D+01 0.107901619626528D+01 0.105674534337175D+01 0.103550763415056D+01 0.101528702378910D+01 0.996065930437303D+00 0.977826031201778D+00 0.960548872816983D+00 0.944216311273948D+00 0.928810804429128D+00 0.914315588247178D+00 0.900714770600399D+00 0.887993376463073D+00 0.876137375168778D+00 0.865133714647815D+00 0.854970379933218D+00 0.845636484567866D+00 0.837122394795949D+00 0.829419878524944D+00 0.822522264875016D+00 0.816424596413514D+00 0.811123755391590D+00 0.806618547646372D+00 0.802909733152726D+00 0.800000000000000D+00 0.797893487085729D+00 0.796571490437749D+00 0.796016604350652D+00 0.796212791236246D+00 0.797145154233066D+00 0.798799791480354D+00 0.801163707246156D+00 0.804224756029268D+00 0.807971598659661D+00 0.812393653642225D+00 0.817481031855349D+00 0.823224447623694D+00 0.829615103640642D+00 0.836644550868662D+00 0.844304527193905D+00 0.852586780197978D+00 0.861482880002988D+00 0.870984027910659D+00 0.881080865720699D+00 0.891763289435174D+00 0.903020269788425D+00 0.914839680910002D+00 0.927208137604343D+00 0.940110841325163D+00 0.953531434975715D+00 0.967451867152575D+00 0.981852267286157D+00 0.996710834185688D+00 0.101200374161076D+01 0.102770506549514D+01 0.104378673817842D+01 0.106021853531852D+01 0.107696810096453D+01 0.109400101551509D+01 0.111128090998179D+01 0.112876962818202D+01 0.114642743632174D+01 0.116421327705157D+01 0.118208506268001D+01 0.120000000000000D+01 0.226050516674263D+01 0.225958266181012D+01 0.225681936057486D+01 0.225222786392716D+01 0.224582904129796D+01 0.223765183467275D+01 0.222773298834880D+01 0.221611670846145D+01 0.220285425729936D+01 0.218800348831214D+01 0.217162832847010D+01 0.215379821525076D+01 0.213458749599103D+01 0.211407479765297D+01 0.209234237520376D+01 0.206947544680995D+01 0.204556152390075D+01 0.202068974387405D+01 0.199495021281696D+01 0.196843336510573D+01 0.194122934615425D+01 0.191342742391659D+01 0.188511543403452D+01 0.185637926277522D+01 0.182730237114550D+01 0.179796536281328D+01 0.176844559772995D+01 0.173881685264210D+01 0.170914902901877D+01 0.167950790830920D+01 0.164995495389418D+01 0.162054715860363D+01 0.159133693624912D+01 0.156237205526098D+01 0.153369561222693D+01 0.150534604289869D+01 0.147735716806439D+01 0.144975827157241D+01 0.142257420773479D+01 0.139582553533081D+01 0.136953141604389D+01 0.134285112192738D+01 0.131503968537010D+01 0.128629912750243D+01 0.125681470616272D+01 0.122675650002547D+01 0.119627883666451D+01 0.116552015447552D+01 0.113460322881133D+01 0.110363569290565D+01 0.107271078693228D+01 0.104190827325539D+01 0.101129546201160D+01 0.980928298130435D+00 0.950852468318883D+00 0.921104494052418D+00 0.891712783938212D+00 0.862698625716698D+00 0.834077104471715D+00 0.805857939200578D+00 0.778046234672232D+00 0.750643149429857D+00 0.723646483863885D+00 0.697051194511014D+00 0.670849842169901D+00 0.645032982130864D+00 0.619589504878695D+00 0.594506935144761D+00 0.569771696262711D+00 0.545369345537585D+00 0.521284784886866D+00 0.497502449467229D+00 0.474006475472804D+00 0.450780846877379D+00 0.427809519681661D+00 0.405076521288841D+00 0.382566022021278D+00 0.360262375543421D+00 0.338150125086694D+00 0.316213972877089D+00 0.294437532933012D+00 0.272925744105814D+00 0.251773897752212D+00 0.230947178630139D+00 0.210413596304102D+00 0.190142758930358D+00 0.170105868155010D+00 0.150275733028726D+00 0.130626790728643D+00 0.111135123411277D+00 0.917784622108275D-01 0.725361711985517D-01 0.533892059821284D-01 0.343200434984148D-01 0.153125813874055D-01 -0.364799291687312D-02 -0.225753616277924D-01 -0.414822613870847D-01 -0.603806889570979D-01 -0.792821223970996D-01 -0.981977515563415D-01 -0.117138711248925D+00 -0.136116310290681D+00 -0.155142249676690D+00 -0.174228823553211D+00 -0.193389097278311D+00 -0.212637057749641D+00 -0.231987732281276D+00 -0.251457273599760D+00 -0.271063009965271D+00 -0.290823460964127D+00 -0.310758321116857D+00 -0.330888415052755D+00 -0.351235629566267D+00 -0.371822829343103D+00 -0.392673764474152D+00 -0.413812979016877D+00 -0.435265730771333D+00 -0.457057933072287D+00 -0.479216129723143D+00 -0.501766834582558D+00 -0.524641446508056D+00 -0.547762515200505D+00 -0.571138833699383D+00 -0.594779236040042D+00 -0.618692063920561D+00 -0.642885251964538D+00 -0.667366299084913D+00 -0.692142105377584D+00 -0.717218660314201D+00 -0.742600575219230D+00 -0.768290460800802D+00 -0.794288158538441D+00 -0.820589842687669D+00 -0.847187017224433D+00 -0.874065438921319D+00 -0.901204003649001D+00 -0.928573637694363D+00 -0.956136239189167D+00 -0.983843716504698D+00 -0.101163717059338D+01 -0.103944626670256D+01 -0.106718883764676D+01 -0.109477075594463D+01 -0.112208610568705D+01 -0.114901767712313D+01 -0.117543779779448D+01 -0.120120950382216D+01 -0.122618804391571D+01 -0.125022269714481D+01 -0.127315887386591D+01 -0.129484045785535D+01 -0.131511233713840D+01 -0.133382306171381D+01 -0.135082755884938D+01 -0.136598983132479D+01 -0.137918556131214D+01 -0.139030454280126D+01 -0.139925286874647D+01 -0.140595480543154D+01 -0.141035405601237D+01 -0.141085394456217D+01 -0.140590891105002D+01 -0.139562978918681D+01 -0.138023297873994D+01 -0.136002973236313D+01 -0.133541175805541D+01 -0.130683389556183D+01 -0.127479500309386D+01 -0.123981823515738D+01 -0.120243184267400D+01 -0.116315149686000D+01 -0.112246494868749D+01 -0.108081960922241D+01 -0.103861339532123D+01 -0.996188949777697D+00 -0.953831130443854D+00 -0.911767479873520D+00 -0.870171242294377D+00 -0.829166391652949D+00 -0.788834074265128D+00 -0.749219851746525D+00 -0.710341152406408D+00 -0.672194398556609D+00 -0.634761367757102D+00 -0.598014460535408D+00 -0.561920676574572D+00 -0.526444235682095D+00 -0.491547908632421D+00 -0.457193236305162D+00 -0.423339904711206D+00 -0.389944601598975D+00 -0.356959702745387D+00 -0.324332120858435D+00 -0.292002598418653D+00 -0.259905642228604D+00 -0.227970189668509D+00 -0.196120975342839D+00 -0.164280444777292D+00 -0.132370952927441D+00 -0.100324921339934D+00 -0.685701912450210D-01 -0.375376547015427D-01 -0.717398403006886D-02 0.225709976482724D-01 0.517400048821659D-01 0.803710602618146D-01 0.108499290978286D+00 0.136157828270089D+00 0.163377952259129D+00 0.190188663913773D+00 0.216615879629396D+00 0.242681435705856D+00 0.268402064899347D+00 0.293788471065259D+00 0.318844586586318D+00 0.343567056181657D+00 0.367944954253632D+00 0.391959714354213D+00 0.415585230490290D+00 0.438788081354533D+00 0.461527829496573D+00 0.483757356318353D+00 0.505423208303222D+00 0.526465947427435D+00 0.546820516548236D+00 0.566416646208843D+00 0.585179340662263D+00 0.603029486492033D+00 0.619884626189011D+00 0.635659931353145D+00 0.650269396467706D+00 0.663627255722186D+00 0.675649603931361D+00 0.686256180345248D+00 0.695372253338635D+00 0.702930526798995D+00 0.708872977390826D+00 0.713152527165497D+00 0.715734458968691D+00 0.716597492799513D+00 0.000000000000000D+00 -0.738003946004095D-01 -0.147263704220313D+00 -0.220056027596005D+00 -0.291849782739861D+00 -0.362326747276898D+00 -0.431180958639477D+00 -0.498121432348242D+00 -0.562874660618728D+00 -0.625186858359150D+00 -0.684825929003985D+00 -0.741583128542800D+00 -0.795274412235969D+00 -0.845741454808468D+00 -0.892852341128680D+00 -0.936501930376288D+00 -0.976611902359181D+00 -0.101313049977740D+01 -0.104603198478959D+01 -0.107531583210854D+01 -0.110100568400995D+01 -0.112314809500305D+01 -0.114181109556242D+01 -0.115708260518197D+01 -0.116906872519564D+01 -0.117789194138140D+01 -0.118368926528554D+01 -0.118661034174181D+01 -0.118681554812490D+01 -0.118447410864064D+01 -0.117976224456129D+01 -0.117286137868220D+01 -0.116395640967895D+01 -0.115323406937193D+01 -0.114088137335244D+01 -0.112708417290683D+01 -0.111202581383729D+01 -0.109588590552043D+01 -0.107883920148915D+01 -0.106105459082997D+01 -0.104247495212313D+01 -0.109194857719785D+01 -0.113296634738482D+01 -0.116627828202880D+01 -0.119247542514742D+01 -0.121218106583285D+01 -0.122603200304425D+01 -0.123466257207454D+01 -0.123869148106053D+01 -0.123871139139382D+01 -0.123528108647619D+01 -0.122892000767507D+01 -0.122010489182784D+01 -0.120926821866547D+01 -0.119679816625862D+01 -0.118303977505860D+01 -0.116829703407788D+01 -0.115283562364326D+01 -0.113688607595535D+01 -0.112064714573563D+01 -0.110428921653209D+01 -0.108795760285787D+01 -0.107177564241994D+01 -0.105584750580974D+01 -0.104026068147931D+01 -0.102508812164359D+01 -0.101039005852996D+01 -0.996215520184762D+00 -0.982603590379227D+00 -0.969584467630824D+00 -0.957180384426692D+00 -0.945406449144315D+00 -0.934271470409698D+00 -0.923778817224274D+00 -0.913927358433142D+00 -0.904712512992489D+00 -0.896127428412541D+00 -0.888164289816018D+00 -0.880815746722163D+00 -0.874076430046244D+00 -0.868038765479895D+00 -0.852904340695915D+00 -0.839243367592246D+00 -0.826894162173630D+00 -0.815792423909301D+00 -0.805874565990194D+00 -0.797076696037635D+00 -0.789334114065099D+00 -0.782581269941573D+00 -0.776752115447721D+00 -0.771780780588216D+00 -0.767602500393849D+00 -0.764154716920018D+00 -0.761378281777070D+00 -0.759218687103669D+00 -0.757627257238624D+00 -0.756562239634917D+00 -0.755989741108465D+00 -0.755884464492595D+00 -0.756230210707542D+00 -0.757020122031804D+00 -0.758256653374900D+00 -0.759951269965597D+00 -0.762123880915055D+00 -0.764802029206635D+00 -0.768019868801417D+00 -0.771816968904915D+00 -0.776236993625900D+00 -0.781326311852837D+00 -0.787132597388052D+00 -0.793703482520414D+00 -0.801085329698026D+00 -0.809322185173755D+00 -0.818454975907201D+00 -0.828521006239669D+00 -0.839553804244275D+00 -0.851583359173702D+00 -0.864636781182781D+00 -0.878739402893558D+00 -0.893916329174971D+00 -0.910140059578168D+00 -0.919828894461716D+00 -0.929856600934187D+00 -0.940248878976035D+00 -0.950983308276676D+00 -0.962042922164841D+00 -0.973412121353334D+00 -0.985071648276658D+00 -0.996992855137080D+00 -0.100913153979221D+01 -0.102142165261014D+01 -0.103376919391565D+01 -0.104604662509544D+01 -0.105808810684280D+01 -0.106968585609835D+01 -0.108058787965248D+01 -0.109049729856210D+01 -0.109907342506688D+01 -0.110593469451743D+01 -0.111066349072502D+01 -0.111281283636941D+01 -0.111191485236546D+01 -0.110749082317056D+01 -0.109906264065884D+01 -0.108616533873445D+01 -0.106836037615210D+01 -0.104524927755563D+01 -0.101648720465874D+01 -0.981796002825064D+00 -0.940976255503045D+00 -0.893917882184425D+00 -0.840608836970702D+00 -0.781141505673943D+00 -0.715716460358351D+00 -0.644643310487680D+00 -0.568338487544651D+00 -0.487319911443151D+00 -0.402198607687154D+00 -0.313667467929335D+00 -0.222487466875876D+00 -0.129452579590605D+00 0.894614956060025D-01 0.306141185366471D+00 0.516188563690179D+00 0.715556272059103D+00 0.900703438085770D+00 0.106873450653211D+01 0.121749449295443D+01 0.134561690448329D+01 0.145252453043447D+01 0.153838686823597D+01 0.160404079688412D+01 0.165088305691690D+01 0.168074410028929D+01 0.169575301180522D+01 0.169820263167750D+01 0.169042291502990D+01 0.167466913059684D+01 0.165302987573455D+01 0.162735817557973D+01 0.159922721544596D+01 0.156991058604206D+01 0.154038536116712D+01 0.151135494681682D+01 0.148328751714377D+01 0.145646506059176D+01 0.143103765627508D+01 0.140707761512306D+01 0.138462854885084D+01 0.136374523732989D+01 0.134452129018658D+01 0.132710295879193D+01 0.131168894949507D+01 0.129851760146114D+01 0.128784419372145D+01 0.127991230148243D+01 0.127492390332513D+01 0.127301324272846D+01 0.127422920251536D+01 0.127853014547270D+01 0.128515238152787D+01 0.125522602606516D+01 0.122737689741310D+01 0.120171675630480D+01 0.117788177796250D+01 0.115563880074898D+01 0.113484562962292D+01 0.111541282769476D+01 0.109727015564953D+01 0.108033976347368D+01 0.106451716889779D+01 0.104966008835206D+01 0.103558439776474D+01 0.102206593771452D+01 0.100884655555848D+01 0.995642686126175D+00 0.982154881500996D+00 0.968076964256959D+00 0.953103843789549D+00 0.936937447096575D+00 0.919290622042901D+00 0.899889229320294D+00 0.878472916422090D+00 0.854795242367423D+00 0.828623887569613D+00 0.799741642094531D+00 0.767948730753964D+00 0.733066825519657D+00 0.694944840861922D+00 0.653466334896358D+00 0.608558078234367D+00 0.560199130930528D+00 0.508429609427807D+00 0.453358247306212D+00 0.395167865804780D+00 0.334117973666181D+00 0.270543903162590D+00 0.204852144183931D+00 0.137511837789717D+00 0.690427064657939D-01 0.000000000000000D+00 SHAR_EOF fi # end of overwriting check if test -f 'res1_1' then echo shar: will not over-write existing file "'res1_1'" else cat << "SHAR_EOF" > 'res1_1' 241 0.000000000000000D+00 0.565126291685656D-01 0.112979133090506D+00 0.169353597197309D+00 0.225590526286864D+00 0.281645049262207D+00 0.337473118020501D+00 0.393031698679646D+00 0.448278953443574D+00 0.503174411544615D+00 0.557679127859181D+00 0.611755827968119D+00 0.665369038621719D+00 0.718485202767671D+00 0.771072778504368D+00 0.823102321527859D+00 0.874546550844865D+00 0.925380397722897D+00 0.975581038038567D+00 0.102512790836374D+01 0.107400270629385D+01 0.112218937567146D+01 0.116967407748968D+01 0.121644514737318D+01 0.126249304062844D+01 0.130781026593046D+01 0.135239130876911D+01 0.139623254581696D+01 0.143933215140121D+01 0.148168999726789D+01 0.152330754681667D+01 0.156418774496260D+01 0.160433490474686D+01 0.164375459177506D+01 0.168245350750990D+01 0.172043937238641D+01 0.175772080965484D+01 0.179430723078962D+01 0.183020872323346D+01 0.186543594117636D+01 0.190000000000000D+01 0.193391251197856D+01 0.196714255609637D+01 0.199966449624706D+01 0.203145751247149D+01 0.206250523155520D+01 0.209279533747276D+01 0.212231917338843D+01 0.215107134519654D+01 0.217904933482899D+01 0.220625312984182D+01 0.223268487417561D+01 0.225834854350459D+01 0.228324964727619D+01 0.230739495841111D+01 0.233079227069213D+01 0.235345018311373D+01 0.237537790988904D+01 0.239658511439957D+01 0.241708176511263D+01 0.243687801135960D+01 0.245598407684624D+01 0.247441016883109D+01 0.249216640103943D+01 0.250926272855664D+01 0.252570889314793D+01 0.254151437766318D+01 0.255668836839186D+01 0.257123972442042D+01 0.258517695320500D+01 0.259850819169730D+01 0.261124119244934D+01 0.262338331417066D+01 0.263494151622298D+01 0.264592235651453D+01 0.265633199220706D+01 0.266617618257897D+01 0.267546029330813D+01 0.268418930135615D+01 0.269236779956246D+01 0.270000000000000D+01 0.270708967620911D+01 0.271364628720529D+01 0.271967837109672D+01 0.272519364613680D+01 0.273019905091193D+01 0.273470078408332D+01 0.273870434431968D+01 0.274221457073475D+01 0.274523568385611D+01 0.274777132690532D+01 0.274982460696665D+01 0.275139813546524D+01 0.275249406726576D+01 0.275311413764016D+01 0.275325969633513D+01 0.275293173799432D+01 0.275213092825374D+01 0.275085762492497D+01 0.274911189380588D+01 0.274689351880511D+01 0.274420200622807D+01 0.274103658324267D+01 0.273739619071353D+01 0.273327947075883D+01 0.272868474953587D+01 0.272361001589492D+01 0.271805289664839D+01 0.271201062928085D+01 0.270548003296840D+01 0.269845747878259D+01 0.269093885992020D+01 0.268291956272674D+01 0.267439443916756D+01 0.266535778124843D+01 0.265580329770040D+01 0.264572409302472D+01 0.263511264874956D+01 0.262396080648616D+01 0.261225975209595D+01 0.260000000000000D+01 0.258717141036682D+01 0.257376792767460D+01 0.255978328460679D+01 0.254521098598963D+01 0.253004432280479D+01 0.251427638279360D+01 0.249790006020656D+01 0.248090806783935D+01 0.246329295493768D+01 0.244504713482364D+01 0.242616292617672D+01 0.240663261178360D+01 0.238644851824980D+01 0.236560311964922D+01 0.234408916738858D+01 0.232189984770315D+01 0.229902896720613D+01 0.227547116581844D+01 0.225122215524667D+01 0.222627897999320D+01 0.220064029671700D+01 0.217430666665807D+01 0.214728085483466D+01 0.211956812886084D+01 0.209117654955031D+01 0.206211724500469D+01 0.203240465966059D+01 0.200205676981358D+01 0.197109525746480D+01 0.193954563495634D+01 0.190743731377151D+01 0.187480361206357D+01 0.184168169691459D+01 0.180811245897788D+01 0.177414031897212D+01 0.173981296741164D+01 0.170518104090651D+01 0.167029774027158D+01 0.163521839746919D+01 0.160000000000000D+01 0.156470069466857D+01 0.152945730277189D+01 0.149440524911607D+01 0.145967581331255D+01 0.142539360017907D+01 0.139167432669439D+01 0.135862301227630D+01 0.132633263191630D+01 0.129488326212161D+01 0.126434172015843D+01 0.123476166998791D+01 0.120618414531543D+01 0.117863842255353D+01 0.115214316485431D+01 0.112670775278747D+01 0.110233371736543D+01 0.107901619626528D+01 0.105674534337175D+01 0.103550763415056D+01 0.101528702378910D+01 0.996065930437303D+00 0.977826031201778D+00 0.960548872816983D+00 0.944216311273948D+00 0.928810804429128D+00 0.914315588247178D+00 0.900714770600399D+00 0.887993376463073D+00 0.876137375168778D+00 0.865133714647815D+00 0.854970379933218D+00 0.845636484567866D+00 0.837122394795949D+00 0.829419878524944D+00 0.822522264875016D+00 0.816424596413514D+00 0.811123755391590D+00 0.806618547646372D+00 0.802909733152726D+00 0.800000000000000D+00 0.797893487085729D+00 0.796571490437749D+00 0.796016604350652D+00 0.796212791236246D+00 0.797145154233066D+00 0.798799791480354D+00 0.801163707246156D+00 0.804224756029268D+00 0.807971598659661D+00 0.812393653642225D+00 0.817481031855349D+00 0.823224447623694D+00 0.829615103640642D+00 0.836644550868662D+00 0.844304527193905D+00 0.852586780197978D+00 0.861482880002988D+00 0.870984027910659D+00 0.881080865720699D+00 0.891763289435174D+00 0.903020269788425D+00 0.914839680910002D+00 0.927208137604343D+00 0.940110841325163D+00 0.953531434975715D+00 0.967451867152575D+00 0.981852267286157D+00 0.996710834185688D+00 0.101200374161076D+01 0.102770506549514D+01 0.104378673817842D+01 0.106021853531852D+01 0.107696810096453D+01 0.109400101551509D+01 0.111128090998179D+01 0.112876962818202D+01 0.114642743632174D+01 0.116421327705157D+01 0.118208506268001D+01 0.120000000000000D+01 0.226050516674263D+01 0.225958266181012D+01 0.225681936057486D+01 0.225222786392716D+01 0.224582904129796D+01 0.223765183467275D+01 0.222773298834880D+01 0.221611670846145D+01 0.220285425729936D+01 0.218800348831214D+01 0.217162832847010D+01 0.215379821525076D+01 0.213458749599103D+01 0.211407479765297D+01 0.209234237520376D+01 0.206947544680995D+01 0.204556152390075D+01 0.202068974387405D+01 0.199495021281696D+01 0.196843336510573D+01 0.194122934615425D+01 0.191342742391659D+01 0.188511543403452D+01 0.185637926277522D+01 0.182730237114550D+01 0.179796536281328D+01 0.176844559772995D+01 0.173881685264210D+01 0.170914902901877D+01 0.167950790830920D+01 0.164995495389418D+01 0.162054715860363D+01 0.159133693624912D+01 0.156237205526098D+01 0.153369561222693D+01 0.150534604289869D+01 0.147735716806439D+01 0.144975827157241D+01 0.142257420773479D+01 0.139582553533081D+01 0.136953141604389D+01 0.134285112192738D+01 0.131503968537010D+01 0.128629912750243D+01 0.125681470616272D+01 0.122675650002547D+01 0.119627883666451D+01 0.116552015447552D+01 0.113460322881133D+01 0.110363569290565D+01 0.107271078693228D+01 0.104190827325539D+01 0.101129546201160D+01 0.980928298130435D+00 0.950852468318883D+00 0.921104494052418D+00 0.891712783938212D+00 0.862698625716698D+00 0.834077104471715D+00 0.805857939200578D+00 0.778046234672232D+00 0.750643149429857D+00 0.723646483863885D+00 0.697051194511014D+00 0.670849842169901D+00 0.645032982130864D+00 0.619589504878695D+00 0.594506935144761D+00 0.569771696262711D+00 0.545369345537585D+00 0.521284784886866D+00 0.497502449467229D+00 0.474006475472804D+00 0.450780846877379D+00 0.427809519681661D+00 0.405076521288841D+00 0.382566022021278D+00 0.360262375543421D+00 0.338150125086694D+00 0.316213972877089D+00 0.294437532933012D+00 0.272925744105814D+00 0.251773897752212D+00 0.230947178630139D+00 0.210413596304102D+00 0.190142758930358D+00 0.170105868155010D+00 0.150275733028726D+00 0.130626790728643D+00 0.111135123411277D+00 0.917784622108275D-01 0.725361711985517D-01 0.533892059821284D-01 0.343200434984148D-01 0.153125813874055D-01 -0.364799291687312D-02 -0.225753616277924D-01 -0.414822613870847D-01 -0.603806889570979D-01 -0.792821223970996D-01 -0.981977515563415D-01 -0.117138711248925D+00 -0.136116310290681D+00 -0.155142249676690D+00 -0.174228823553211D+00 -0.193389097278311D+00 -0.212637057749641D+00 -0.231987732281276D+00 -0.251457273599760D+00 -0.271063009965271D+00 -0.290823460964127D+00 -0.310758321116857D+00 -0.330888415052755D+00 -0.351235629566267D+00 -0.371822829343103D+00 -0.392673764474152D+00 -0.413812979016877D+00 -0.435265730771333D+00 -0.457057933072287D+00 -0.479216129723143D+00 -0.501766834582558D+00 -0.524641446508056D+00 -0.547762515200505D+00 -0.571138833699383D+00 -0.594779236040042D+00 -0.618692063920561D+00 -0.642885251964538D+00 -0.667366299084913D+00 -0.692142105377584D+00 -0.717218660314201D+00 -0.742600575219230D+00 -0.768290460800802D+00 -0.794288158538441D+00 -0.820589842687669D+00 -0.847187017224433D+00 -0.874065438921319D+00 -0.901204003649001D+00 -0.928573637694363D+00 -0.956136239189167D+00 -0.983843716504698D+00 -0.101163717059338D+01 -0.103944626670256D+01 -0.106718883764676D+01 -0.109477075594463D+01 -0.112208610568705D+01 -0.114901767712313D+01 -0.117543779779448D+01 -0.120120950382216D+01 -0.122618804391571D+01 -0.125022269714481D+01 -0.127315887386591D+01 -0.129484045785535D+01 -0.131511233713840D+01 -0.133382306171381D+01 -0.135082755884938D+01 -0.136598983132479D+01 -0.137918556131214D+01 -0.139030454280126D+01 -0.139925286874647D+01 -0.140595480543154D+01 -0.141035405601237D+01 -0.141085394456217D+01 -0.140590891105002D+01 -0.139562978918681D+01 -0.138023297873994D+01 -0.136002973236313D+01 -0.133541175805541D+01 -0.130683389556183D+01 -0.127479500309386D+01 -0.123981823515738D+01 -0.120243184267400D+01 -0.116315149686000D+01 -0.112246494868749D+01 -0.108081960922241D+01 -0.103861339532123D+01 -0.996188949777697D+00 -0.953831130443854D+00 -0.911767479873520D+00 -0.870171242294377D+00 -0.829166391652949D+00 -0.788834074265128D+00 -0.749219851746525D+00 -0.710341152406408D+00 -0.672194398556609D+00 -0.634761367757102D+00 -0.598014460535408D+00 -0.561920676574572D+00 -0.526444235682095D+00 -0.491547908632421D+00 -0.457193236305162D+00 -0.423339904711206D+00 -0.389944601598975D+00 -0.356959702745387D+00 -0.324332120858435D+00 -0.292002598418653D+00 -0.259905642228604D+00 -0.227970189668509D+00 -0.196120975342839D+00 -0.164280444777292D+00 -0.132370952927441D+00 -0.100324921339934D+00 -0.685701912450210D-01 -0.375376547015427D-01 -0.717398403006886D-02 0.225709976482724D-01 0.517400048821659D-01 0.803710602618146D-01 0.108499290978286D+00 0.136157828270089D+00 0.163377952259129D+00 0.190188663913773D+00 0.216615879629396D+00 0.242681435705856D+00 0.268402064899347D+00 0.293788471065259D+00 0.318844586586318D+00 0.343567056181657D+00 0.367944954253632D+00 0.391959714354213D+00 0.415585230490290D+00 0.438788081354533D+00 0.461527829496573D+00 0.483757356318353D+00 0.505423208303222D+00 0.526465947427435D+00 0.546820516548236D+00 0.566416646208843D+00 0.585179340662263D+00 0.603029486492033D+00 0.619884626189011D+00 0.635659931353145D+00 0.650269396467706D+00 0.663627255722186D+00 0.675649603931361D+00 0.686256180345248D+00 0.695372253338635D+00 0.702930526798995D+00 0.708872977390826D+00 0.713152527165497D+00 0.715734458968691D+00 0.716597492799513D+00 0.000000000000000D+00 -0.738003946004095D-01 -0.147263704220313D+00 -0.220056027596005D+00 -0.291849782739861D+00 -0.362326747276898D+00 -0.431180958639477D+00 -0.498121432348242D+00 -0.562874660618728D+00 -0.625186858359150D+00 -0.684825929003985D+00 -0.741583128542800D+00 -0.795274412235969D+00 -0.845741454808468D+00 -0.892852341128680D+00 -0.936501930376288D+00 -0.976611902359181D+00 -0.101313049977740D+01 -0.104603198478959D+01 -0.107531583210854D+01 -0.110100568400995D+01 -0.112314809500305D+01 -0.114181109556242D+01 -0.115708260518197D+01 -0.116906872519564D+01 -0.117789194138140D+01 -0.118368926528554D+01 -0.118661034174181D+01 -0.118681554812490D+01 -0.118447410864064D+01 -0.117976224456129D+01 -0.117286137868220D+01 -0.116395640967895D+01 -0.115323406937193D+01 -0.114088137335244D+01 -0.112708417290683D+01 -0.111202581383729D+01 -0.109588590552043D+01 -0.107883920148915D+01 -0.106105459082997D+01 -0.104247495212313D+01 -0.109194857719785D+01 -0.113296634738482D+01 -0.116627828202880D+01 -0.119247542514742D+01 -0.121218106583285D+01 -0.122603200304425D+01 -0.123466257207454D+01 -0.123869148106053D+01 -0.123871139139382D+01 -0.123528108647619D+01 -0.122892000767507D+01 -0.122010489182784D+01 -0.120926821866547D+01 -0.119679816625862D+01 -0.118303977505860D+01 -0.116829703407788D+01 -0.115283562364326D+01 -0.113688607595535D+01 -0.112064714573563D+01 -0.110428921653209D+01 -0.108795760285787D+01 -0.107177564241994D+01 -0.105584750580974D+01 -0.104026068147931D+01 -0.102508812164359D+01 -0.101039005852996D+01 -0.996215520184762D+00 -0.982603590379227D+00 -0.969584467630824D+00 -0.957180384426692D+00 -0.945406449144315D+00 -0.934271470409698D+00 -0.923778817224274D+00 -0.913927358433142D+00 -0.904712512992489D+00 -0.896127428412541D+00 -0.888164289816018D+00 -0.880815746722163D+00 -0.874076430046244D+00 -0.868038765479895D+00 -0.852904340695915D+00 -0.839243367592246D+00 -0.826894162173630D+00 -0.815792423909301D+00 -0.805874565990194D+00 -0.797076696037635D+00 -0.789334114065099D+00 -0.782581269941573D+00 -0.776752115447721D+00 -0.771780780588216D+00 -0.767602500393849D+00 -0.764154716920018D+00 -0.761378281777070D+00 -0.759218687103669D+00 -0.757627257238624D+00 -0.756562239634917D+00 -0.755989741108465D+00 -0.755884464492595D+00 -0.756230210707542D+00 -0.757020122031804D+00 -0.758256653374900D+00 -0.759951269965597D+00 -0.762123880915055D+00 -0.764802029206635D+00 -0.768019868801417D+00 -0.771816968904915D+00 -0.776236993625900D+00 -0.781326311852837D+00 -0.787132597388052D+00 -0.793703482520414D+00 -0.801085329698026D+00 -0.809322185173755D+00 -0.818454975907201D+00 -0.828521006239669D+00 -0.839553804244275D+00 -0.851583359173702D+00 -0.864636781182781D+00 -0.878739402893558D+00 -0.893916329174971D+00 -0.910140059578168D+00 -0.919828894461716D+00 -0.929856600934187D+00 -0.940248878976035D+00 -0.950983308276676D+00 -0.962042922164841D+00 -0.973412121353334D+00 -0.985071648276658D+00 -0.996992855137080D+00 -0.100913153979221D+01 -0.102142165261014D+01 -0.103376919391565D+01 -0.104604662509544D+01 -0.105808810684280D+01 -0.106968585609835D+01 -0.108058787965248D+01 -0.109049729856210D+01 -0.109907342506688D+01 -0.110593469451743D+01 -0.111066349072502D+01 -0.111281283636941D+01 -0.111191485236546D+01 -0.110749082317056D+01 -0.109906264065884D+01 -0.108616533873445D+01 -0.106836037615210D+01 -0.104524927755563D+01 -0.101648720465874D+01 -0.981796002825064D+00 -0.940976255503045D+00 -0.893917882184425D+00 -0.840608836970702D+00 -0.781141505673943D+00 -0.715716460358351D+00 -0.644643310487680D+00 -0.568338487544651D+00 -0.487319911443151D+00 -0.402198607687154D+00 -0.313667467929335D+00 -0.222487466875876D+00 -0.129452579590605D+00 0.894614956060025D-01 0.306141185366471D+00 0.516188563690179D+00 0.715556272059103D+00 0.900703438085770D+00 0.106873450653211D+01 0.121749449295443D+01 0.134561690448329D+01 0.145252453043447D+01 0.153838686823597D+01 0.160404079688412D+01 0.165088305691690D+01 0.168074410028929D+01 0.169575301180522D+01 0.169820263167750D+01 0.169042291502990D+01 0.167466913059684D+01 0.165302987573455D+01 0.162735817557973D+01 0.159922721544596D+01 0.156991058604206D+01 0.154038536116712D+01 0.151135494681682D+01 0.148328751714377D+01 0.145646506059176D+01 0.143103765627508D+01 0.140707761512306D+01 0.138462854885084D+01 0.136374523732989D+01 0.134452129018658D+01 0.132710295879193D+01 0.131168894949507D+01 0.129851760146114D+01 0.128784419372145D+01 0.127991230148243D+01 0.127492390332513D+01 0.127301324272846D+01 0.127422920251536D+01 0.127853014547270D+01 0.128515238152787D+01 0.125522602606516D+01 0.122737689741310D+01 0.120171675630480D+01 0.117788177796250D+01 0.115563880074898D+01 0.113484562962292D+01 0.111541282769476D+01 0.109727015564953D+01 0.108033976347368D+01 0.106451716889779D+01 0.104966008835206D+01 0.103558439776474D+01 0.102206593771452D+01 0.100884655555848D+01 0.995642686126175D+00 0.982154881500996D+00 0.968076964256959D+00 0.953103843789549D+00 0.936937447096575D+00 0.919290622042901D+00 0.899889229320294D+00 0.878472916422090D+00 0.854795242367423D+00 0.828623887569613D+00 0.799741642094531D+00 0.767948730753964D+00 0.733066825519657D+00 0.694944840861922D+00 0.653466334896358D+00 0.608558078234367D+00 0.560199130930528D+00 0.508429609427807D+00 0.453358247306212D+00 0.395167865804780D+00 0.334117973666181D+00 0.270543903162590D+00 0.204852144183931D+00 0.137511837789717D+00 0.690427064657939D-01 0.000000000000000D+00 SHAR_EOF fi # end of overwriting check if test -f 'res1_2' then echo shar: will not over-write existing file "'res1_2'" else cat << "SHAR_EOF" > 'res1_2' DNSPLIN1 Output Domain: T(1) = 0.000D+00, T(N) = 0.600D+01 Number of data points: N = 7 Number of grid points: M = 241 Mesh width: H = 0.250000D-01 # CG steps between restarts: MAXCG = 3 Line search tolerance: FMTOL = 1.000D-06 Convergence tolerance: PHTOL = 1.000D-03 Max number of iterations: NGMAX = 200 Iteration 1 (Steepest descent) Functional: phi(F) = 2.695861118877437D+00 Mean absolute L2-gradient: GNRM1 = 9.31D-02 Max-norm of L2-gradient: GNRMM = 1.73D+00 Line search: No. phi evals NPHV = 36 Optimal step-size S = 2.753D+01 Functional phi(Y) = 2.545851221875195D+00 Relative change in phi(Y) DPHI = 4.06D-02 Squared relative change in Y: DY = 1.76D-04 Cubed S-gradient rel. to Y: DG = 1.12D-10 _________________________________________________________________ Iteration 2 (Conjugate gradient) Functional: phi(F) = 2.545851221875195D+00 Mean absolute L2-gradient: GNRM1 = 5.41D-02 Max-norm of L2-gradient: GNRMM = 7.98D-01 Line search: No. phi evals NPHV = 36 Optimal step-size S = 2.454D+01 Functional phi(Y) = 2.534168663474722D+00 Relative change in phi(Y) DPHI = 3.29D-03 Squared relative change in Y: DY = 2.94D-06 Cubed S-gradient rel. to Y: DG = 1.07D-12 _________________________________________________________________ Iteration 3 (Conjugate gradient) Functional: phi(F) = 2.534168663474722D+00 Mean absolute L2-gradient: GNRM1 = 2.31D-02 Max-norm of L2-gradient: GNRMM = 3.97D-01 Line search: No. phi evals NPHV = 37 Optimal step-size S = 3.964D+01 Functional phi(Y) = 2.526798539947565D+00 Relative change in phi(Y) DPHI = 2.09D-03 Squared relative change in Y: DY = 1.77D-05 Cubed S-gradient rel. to Y: DG = 9.68D-13 _________________________________________________________________ Iteration 4 (Conjugate gradient) Functional: phi(F) = 2.526798539947565D+00 Mean absolute L2-gradient: GNRM1 = 1.33D-02 Max-norm of L2-gradient: GNRMM = 1.71D-01 Line search: No. phi evals NPHV = 41 Optimal step-size S = 3.502D+01 Functional phi(Y) = 2.526225131925866D+00 Relative change in phi(Y) DPHI = 1.63D-04 Squared relative change in Y: DY = 1.46D-06 Cubed S-gradient rel. to Y: DG = 3.59D-14 _________________________________________________________________ Number of descent iterations: 4 Total number of phi evaluations in the line searches: 150 Total polygonal curve length: 0.834D+01 SHAR_EOF fi # end of overwriting check if test -f 'res2' then echo shar: will not over-write existing file "'res2'" else cat << "SHAR_EOF" > 'res2' 241 0.000000000000000D+00 -0.829360742837465D-05 -0.165385719963686D-04 -0.246862508436755D-04 -0.326880011101362D-04 -0.404951799358072D-04 -0.480591444610249D-04 -0.553312518264613D-04 -0.622628591731717D-04 -0.688053236426306D-04 -0.749100023767560D-04 -0.805282525179182D-04 -0.856114312089326D-04 -0.901108955930352D-04 -0.939780028138369D-04 -0.971641100152566D-04 -0.996205743414314D-04 -0.101298752936601D-03 -0.102150002944962D-03 -0.102125681510502D-03 -0.101177145776792D-03 -0.992557528867504D-04 -0.963128599823786D-04 -0.922998242044506D-04 -0.871680026921712D-04 -0.808687525827913D-04 -0.733534310111832D-04 -0.645733951093718D-04 -0.544800020060197D-04 -0.430246088258674D-04 -0.301585726891221D-04 -0.158332507107973D-04 0.000000000000000D+00 0.173917376234910D-04 0.356561403892202D-04 0.541093017661466D-04 0.720673152141427D-04 0.888462742163882D-04 0.103762272308128D-03 0.116131403096772D-03 0.125269760268300D-03 0.130493437574956D-03 0.131118528799194D-03 0.126461127688851D-03 0.115837327858520D-03 0.985632226520959D-04 0.739549049614655D-04 0.413284669963100D-04 0.000000000000000D+00 -0.507191942015300D-04 -0.109673592438298D-03 -0.175712457944425D-03 -0.247685052277250D-03 -0.324440635356647D-03 -0.404828465627817D-03 -0.487697800323613D-03 -0.571897895802471D-03 -0.656278007938000D-03 -0.739687392536301D-03 -0.820975305757076D-03 -0.898991004514579D-03 -0.972583746834495D-03 -0.104060279214278D-02 -0.110189740146255D-02 -0.115531683749508D-02 -0.119971036456092D-02 -0.123392724837733D-02 -0.125681675564790D-02 -0.126722815344060D-02 -0.126401070833025D-02 -0.124601368528142D-02 -0.121208634624791D-02 -0.116107794846488D-02 -0.109183774240959D-02 -0.100321496940693D-02 -0.894058858855763D-03 -0.763218625052128D-03 -0.609543463585386D-03 -0.431882547283384D-03 -0.229085021682697D-03 0.000000000000000D+00 0.256554633128918D-03 0.529669023235144D-03 0.808464315834393D-03 0.108206159166928D-02 0.133958199020829D-02 0.157014682352793D-02 0.176287766038594D-02 0.190689636029331D-02 0.199132503739235D-02 0.200528593394801D-02 0.193790118325912D-02 0.177829244179592D-02 0.151558037036961D-02 0.113888394413933D-02 0.637319571262856D-03 0.000000000000000D+00 -0.784041162764370D-03 -0.169681991136176D-02 -0.272042010390575D-02 -0.383691936996759D-02 -0.502838923658343D-02 -0.627689571975233D-02 -0.756450029169852D-02 -0.887326113407064D-02 -0.101852345871898D-01 -0.114824767054253D-01 -0.127470448287615D-01 -0.139609990806115D-01 -0.151064037019369D-01 -0.161653281317506D-01 -0.171198477441215D-01 -0.179520441518846D-01 -0.186440049873921D-01 -0.191778230708348D-01 -0.195355948769096D-01 -0.196994182109046D-01 -0.196513890055909D-01 -0.193735971506462D-01 -0.188481212666753D-01 -0.180570223362896D-01 -0.169823361052695D-01 -0.156060641677953D-01 -0.139101636515259D-01 -0.118765354215962D-01 -0.948701072847333D-02 -0.672333623457288D-02 -0.356715737082321D-02 0.000000000000000D+00 0.399707311560124D-02 0.840105435266431D-02 0.131890047197068D-01 0.183378322334310D-01 0.238243775375045D-01 0.296255051152741D-01 0.357181906058069D-01 0.420795971608575D-01 0.486871373116820D-01 0.555185201909656D-01 0.625517850913439D-01 0.697653189254358D-01 0.771378469057060D-01 0.846483766010657D-01 0.922760690838408D-01 0.100000000000000D+00 0.107797824617506D+00 0.115755041988846D+00 0.123957390236730D+00 0.132491475880360D+00 0.141444947693674D+00 0.150906559828701D+00 0.160966147295717D+00 0.171714574370910D+00 0.183243739569440D+00 0.195646733545520D+00 0.209018246657536D+00 0.223455306899893D+00 0.239058390904567D+00 0.255932879724509D+00 0.274190708376287D+00 0.293951878604906D+00 0.315345348203229D+00 0.338508897740792D+00 0.363588085293656D+00 0.390736007373008D+00 0.420120120192521D+00 0.451940731460233D+00 0.486450876562337D+00 0.523965325187679D+00 0.564857344110569D+00 0.609551774548351D+00 0.658535266659527D+00 0.712411651955642D+00 0.772012668820084D+00 0.838527863080890D+00 0.913644720976453D+00 0.100000000000000D+01 0.110207494596726D+01 0.122658701744047D+01 0.139401801632373D+01 0.165376440638830D+01 0.208597536150621D+01 0.277459528572401D+01 0.371522950367823D+01 0.472499177079291D+01 0.555478177657114D+01 0.610333824336571D+01 0.642627931311385D+01 0.661743831670253D+01 0.674621597629721D+01 0.684677638473460D+01 0.692996918708369D+01 0.700000000000000D+01 0.705978367159175D+01 0.711184533142948D+01 0.715789412310019D+01 0.719907726142581D+01 0.723624639368444D+01 0.727010510093773D+01 0.730122436019571D+01 0.733003759357440D+01 0.735688636141685D+01 0.738208625261895D+01 0.740593786320455D+01 0.742872150627160D+01 0.745069587633604D+01 0.747209960253512D+01 0.749315503266478D+01 0.751407255704962D+01 0.753505429778164D+01 0.755629691224247D+01 0.757799383044732D+01 0.760033737845771D+01 0.762352100837971D+01 0.764774136738857D+01 0.767319950704055D+01 0.770010101330177D+01 0.772865479546811D+01 0.775907250046130D+01 0.779160255392066D+01 0.782657940886240D+01 0.786442324921175D+01 0.790560134184621D+01 0.795060002479165D+01 0.800000000000000D+01 0.805463524429539D+01 0.811499856265846D+01 0.818186200394093D+01 0.825649537515921D+01 0.834054417489819D+01 0.843590342404022D+01 0.854563797180108D+01 0.867688920508546D+01 0.884581280766159D+01 0.908256567223050D+01 0.943435513380375D+01 0.996703966130700D+01 0.107597961716560D+02 0.118800889227265D+02 0.133313732139604D+02 0.150000000000000D+02 -0.132697718853994D-03 -0.132308575970949D-03 -0.131141147322407D-03 -0.129195432910141D-03 -0.126471432737053D-03 -0.122969146807110D-03 -0.118688575125233D-03 -0.113629717697174D-03 -0.107792574529354D-03 -0.101177145628675D-03 -0.937834310023002D-04 -0.856114306574130D-04 -0.766611446009367D-04 -0.669325728392339D-04 -0.564257153777708D-04 -0.451405722207565D-04 -0.330771433707513D-04 -0.202354288282463D-04 -0.661542859121522D-05 0.778285734536431D-05 0.229594289900165D-04 0.389142863553051D-04 0.556474294583978D-04 0.731588583216591D-04 0.914485729732750D-04 0.110516573447903D-03 0.130362859787356D-03 0.150987432041308D-03 0.172390290268035D-03 0.194571434535182D-03 0.217530864920561D-03 0.241268581512976D-03 0.265799906674306D-03 0.285249123113762D-03 0.293740513141245D-03 0.291289398599380D-03 0.277895779601933D-03 0.253559656751885D-03 0.218281031043070D-03 0.172059903681372D-03 0.114896275825473D-03 0.467901482471532D-04 -0.322584790888429D-04 -0.122249607525395D-03 -0.223183240294038D-03 -0.335059383176432D-03 -0.457878045246287D-03 -0.591639239691724D-03 -0.736381289582720D-03 -0.877388739506388D-03 -0.999946109943162D-03 -0.110409167871161D-02 -0.118982541929778D-02 -0.125714730680454D-02 -0.130605731973573D-02 -0.133655544139723D-02 -0.134864166091509D-02 -0.134231597387064D-02 -0.131757838255261D-02 -0.127442889582622D-02 -0.121286752861936D-02 -0.113289430102561D-02 -0.103450923702448D-02 -0.917712362818398D-03 -0.782503704786957D-03 -0.628883287057994D-03 -0.456851128695770D-03 -0.266407240506162D-03 -0.575516214588474D-04 0.169715745273455D-03 0.415394896658719D-03 0.679485894532303D-03 0.961988830706594D-03 0.126290383246362D-02 0.158223106843060D-02 0.191997075483839D-02 0.227612316216302D-02 0.265068862214995D-02 0.304366753522151D-02 0.345506037826707D-02 0.388511723849292D-02 0.423735218588115D-02 0.441527746164380D-02 0.441914054747312D-02 0.424894139499120D-02 0.390468185486914D-02 0.338636536142116D-02 0.269399629412309D-02 0.182757901605133D-02 0.787116589237559D-03 -0.427390833065909D-03 -0.181594793721667D-02 -0.337856650311607D-02 -0.511526798125277D-02 -0.702608639285401D-02 -0.911107155311462D-02 -0.113708858722178D-01 -0.135745592908941D-01 -0.154910315291311D-01 -0.171207956688466D-01 -0.184637530614215D-01 -0.195198107982779D-01 -0.202888884409207D-01 -0.207709233145465D-01 -0.209658743639300D-01 -0.208737245708371D-01 -0.204944819325739D-01 -0.198281790014896D-01 -0.188748709854030D-01 -0.176346324091126D-01 -0.161075523374768D-01 -0.142937281610724D-01 -0.121932579461653D-01 -0.980623135160150D-02 -0.713271911613977D-02 -0.417276112055828D-02 -0.926353029450294D-03 0.260656848206667D-02 0.642614191132471D-02 0.105325985148528D-01 0.149262812912468D-01 0.196076653479544D-01 0.245773796299488D-01 0.298362299695931D-01 0.353852233844201D-01 0.412255934961866D-01 0.473588268612010D-01 0.537866898765831D-01 0.605138438913956D-01 0.672084348213145D-01 0.735354528328448D-01 0.794942230461336D-01 0.850829825423809D-01 0.903013830547444D-01 0.951505045464198D-01 0.996327363646678D-01 0.103751573647000D+00 0.107511384240865D+00 0.110917182237296D+00 0.113974389875761D+00 0.116688494514897D+00 0.119064461405040D+00 0.121105777425078D+00 0.122812987191474D+00 0.124174044269319D+00 0.126040335910770D+00 0.129276524953798D+00 0.133891471132107D+00 0.139900459655549D+00 0.147320671586733D+00 0.156169596816347D+00 0.166464116337665D+00 0.178220738189783D+00 0.191457273396887D+00 0.206196056704762D+00 0.222468586834981D+00 0.240321153976254D+00 0.259820582596929D+00 0.281058539773759D+00 0.304151991043174D+00 0.329237118615539D+00 0.356456153087091D+00 0.385941896723412D+00 0.417816877057728D+00 0.452256279190918D+00 0.489637792697798D+00 0.530646050958531D+00 0.576196749819569D+00 0.627251740385858D+00 0.684691594885374D+00 0.749423380391659D+00 0.822879019258327D+00 0.907819217284459D+00 0.100892968900199D+01 0.113305641725096D+01 0.129177709535288D+01 0.150744179992644D+01 0.181269613952377D+01 0.233554456285180D+01 0.341741911158261D+01 0.553565876145984D+01 0.896664703468567D+01 0.130340331373761D+02 0.156031718805512D+02 0.147164181831433D+02 0.110267717805824D+02 0.697198029234167D+01 0.411280058669462D+01 0.255949330546684D+01 0.183470454425655D+01 0.147002568629189D+01 0.122578892212317D+01 0.103851587606443D+01 0.894762651435819D+00 0.784883612067567D+00 0.697855439970652D+00 0.626818164674006D+00 0.568222716095377D+00 0.519823732090089D+00 0.479459941093346D+00 0.445296009769145D+00 0.416389272356369D+00 0.392412014301584D+00 0.373082029221223D+00 0.358064105051945D+00 0.347024770108213D+00 0.339673250629929D+00 0.335783636115934D+00 0.335194120934901D+00 0.337794841542831D+00 0.343516261325391D+00 0.352323729721903D+00 0.364217423459124D+00 0.379231911446865D+00 0.397427989286719D+00 0.418877167305595D+00 0.443642307420461D+00 0.471771897276270D+00 0.503582067620464D+00 0.540055267208800D+00 0.582565562328668D+00 0.632175463870482D+00 0.689414204639206D+00 0.755189265230321D+00 0.832281756029914D+00 0.919988501267682D+00 0.101781407716432D+01 0.113197450000601D+01 0.126945736765813D+01 0.143526439104805D+01 0.164075037522306D+01 0.192788624836194D+01 0.240139868688415D+01 0.324541173716032D+01 0.470833860913723D+01 0.707579191261198D+01 0.106035283028177D+02 0.153043940913559D+02 0.205726163384357D+02 0.249592886181881D+02 0.266980285766332D+02 0.000000000000000D+00 0.124525722574615D-04 0.249051444958727D-04 0.373577166966526D-04 0.498102888421342D-04 0.622628609160576D-04 0.747154329040055D-04 0.871680047938809D-04 0.996205765763491D-04 0.112073148245396D-03 0.124525719798593D-03 0.136978291237797D-03 0.149430862569445D-03 0.161883433805046D-03 0.174336004961771D-03 0.186788576062687D-03 0.199241147137479D-03 0.211693718222682D-03 0.224146289362313D-03 0.236598860608232D-03 0.249051432020638D-03 0.261504003668596D-03 0.273956575630372D-03 0.286409147993990D-03 0.298861720857718D-03 0.311314294330390D-03 0.323766868532093D-03 0.336219443594372D-03 0.348672019660882D-03 0.361124596887818D-03 0.373577175444319D-03 0.386029755512980D-03 0.398972649649571D-03 0.223402276413008D-03 0.483222044664550D-04 -0.126757869806130D-03 -0.301837938112176D-03 -0.476917993089378D-03 -0.651998029592701D-03 -0.827078045981616D-03 -0.100215804540716D-02 -0.117723803709906D-02 -0.135231803765281D-02 -0.152739807231687D-02 -0.170247817627969D-02 -0.187755839595692D-02 -0.205263879027844D-02 -0.222771943197555D-02 -0.240402616453632D-02 -0.210821223302105D-02 -0.181362362095572D-02 -0.151903457963467D-02 -0.122444511912260D-02 -0.929855281093780D-03 -0.635265132704316D-03 -0.340674760463761D-03 -0.460842641077791D-04 0.248506249530156D-03 0.543096672646931D-03 0.837686902597390D-03 0.113227684802239D-02 0.142686643497736D-02 0.172145561305903D-02 0.201604436153546D-02 0.231063269547066D-02 0.260522067185615D-02 0.289980839573500D-02 0.319439602633248D-02 0.348898378318158D-02 0.378357195225210D-02 0.407816089207635D-02 0.437275103987833D-02 0.466734291769899D-02 0.496193713852594D-02 0.525653441241725D-02 0.555113555263226D-02 0.584574148175560D-02 0.614035323782633D-02 0.643497198046358D-02 0.672959899699445D-02 0.703222053023264D-02 0.423929778619064D-02 0.145431103821417D-02 -0.133069229167604D-02 -0.411568058774517D-02 -0.690062469616071D-02 -0.968550309417476D-02 -0.124703070593635D-01 -0.152550458389330D-01 -0.180397518191076D-01 -0.208244856946034D-01 -0.236093416382209D-01 -0.263944524705598D-01 -0.291799948298146D-01 -0.319661943414252D-01 -0.347533307869143D-01 -0.375607274243877D-01 -0.329568219732535D-01 -0.283702896503296D-01 -0.237821628205689D-01 -0.191924737418250D-01 -0.146013738375820D-01 -0.100091107269866D-01 -0.541600522903884D-02 -0.822428351233695D-03 0.377122173020572D-02 0.836454269421694D-02 0.129571511004807D-01 0.175487054142915D-01 0.221389290270020D-01 0.267276332653439D-01 0.313147403795968D-01 0.359003064974299D-01 0.404845445286108D-01 0.450678470061643D-01 0.496508088524434D-01 0.542342500630122D-01 0.588192383055306D-01 0.634071114307266D-01 0.679994998821734D-01 0.725983489624333D-01 0.772059408522088D-01 0.818249161716151D-01 0.864582946970023D-01 0.911094945774633D-01 0.957823489990619D-01 0.100481118681399D+00 0.105210497810827D+00 0.110058430663175D+00 0.104168479094230D+00 0.982960972747386D-01 0.923845495505025D-01 0.864557543294131D-01 0.805330620662188D-01 0.746388256673942D-01 0.687925925165400D-01 0.630102005181001D-01 0.573037384855635D-01 0.516817974002208D-01 0.461488470306843D-01 0.407025014216522D-01 0.353284390629156D-01 0.299936735783177D-01 0.246370389463557D-01 0.189167875446898D-01 0.408045449817322D-01 0.627535043951539D-01 0.849247733107461D-01 0.107362859439380D+00 0.130083922358537D+00 0.153081684989090D+00 0.176342939693107D+00 0.199868959574665D+00 0.223700167052655D+00 0.247940898799349D+00 0.272780065367648D+00 0.298502083153089D+00 0.325479632708522D+00 0.354134996950023D+00 0.384855443671270D+00 0.417868638644393D+00 0.453140464445283D+00 0.490403331916980D+00 0.529596038781150D+00 0.572464829480921D+00 0.623743602739239D+00 0.688520661604201D+00 0.769101701949012D+00 0.864657996172255D+00 0.973417347812244D+00 0.109799978838888D+01 0.125258065534450D+01 0.146550568149172D+01 0.177002941346916D+01 0.220202589049785D+01 0.287703580876371D+01 0.402423473759015D+01 0.574390412952442D+01 0.109872454169727D+02 0.236327401424132D+02 0.441509286536578D+02 0.656406960895690D+02 0.645156591965261D+02 0.176967805850766D+02 -0.460728989021301D+02 -0.719957859798199D+02 -0.577575416438826D+02 -0.337362089368230D+02 -0.159696240624660D+02 -0.722361629626312D+01 -0.444610715860608D+01 -0.336946929479291D+01 -0.262326817908684D+01 -0.197683500902872D+01 -0.153929425075535D+01 -0.124560725634592D+01 -0.102758555314676D+01 -0.847468801369359D+00 -0.701298686799873D+00 -0.590342625095900D+00 -0.502903177278540D+00 -0.422112419930272D+00 -0.345159837822848D+00 -0.273399684748711D+00 -0.207173888668194D+00 -0.146084829531219D+00 -0.891637937738778D-01 -0.353038706739426D-01 0.164393848808686D-01 0.667836745728891D-01 0.116301758469035D+00 0.165537230219343D+00 0.215060969371734D+00 0.265402646235998D+00 0.316871844639309D+00 0.369501851964742D+00 0.422982631710966D+00 0.477164243674906D+00 0.540761207339301D+00 0.626381179487453D+00 0.733948264348328D+00 0.853568584989716D+00 0.978071119609467D+00 0.112673081930620D+01 0.134022888628078D+01 0.146638696132777D+01 0.166403146736457D+01 0.198910206356959D+01 0.241034970129840D+01 0.289547504717893D+01 0.368007644642148D+01 0.550827149402267D+01 0.964412653868794D+01 0.173642910701496D+02 0.294493688331113D+02 0.463091368780806D+02 0.665784276085033D+02 0.838492776247176D+02 0.847338342818357D+02 0.556396786702435D+02 0.000000000000000D+00 SHAR_EOF fi # end of overwriting check if test -f 'res2_1' then echo shar: will not over-write existing file "'res2_1'" else cat << "SHAR_EOF" > 'res2_1' 241 0.000000000000000D+00 -0.829360742837465D-05 -0.165385719963686D-04 -0.246862508436755D-04 -0.326880011101362D-04 -0.404951799358072D-04 -0.480591444610249D-04 -0.553312518264613D-04 -0.622628591731717D-04 -0.688053236426306D-04 -0.749100023767560D-04 -0.805282525179182D-04 -0.856114312089326D-04 -0.901108955930352D-04 -0.939780028138369D-04 -0.971641100152566D-04 -0.996205743414314D-04 -0.101298752936601D-03 -0.102150002944962D-03 -0.102125681510502D-03 -0.101177145776792D-03 -0.992557528867504D-04 -0.963128599823786D-04 -0.922998242044506D-04 -0.871680026921712D-04 -0.808687525827913D-04 -0.733534310111832D-04 -0.645733951093718D-04 -0.544800020060197D-04 -0.430246088258674D-04 -0.301585726891221D-04 -0.158332507107973D-04 0.000000000000000D+00 0.173917376234910D-04 0.356561403892202D-04 0.541093017661466D-04 0.720673152141427D-04 0.888462742163882D-04 0.103762272308128D-03 0.116131403096772D-03 0.125269760268300D-03 0.130493437574956D-03 0.131118528799194D-03 0.126461127688851D-03 0.115837327858520D-03 0.985632226520959D-04 0.739549049614655D-04 0.413284669963100D-04 0.000000000000000D+00 -0.507191942015300D-04 -0.109673592438298D-03 -0.175712457944425D-03 -0.247685052277250D-03 -0.324440635356647D-03 -0.404828465627817D-03 -0.487697800323613D-03 -0.571897895802471D-03 -0.656278007938000D-03 -0.739687392536301D-03 -0.820975305757076D-03 -0.898991004514579D-03 -0.972583746834495D-03 -0.104060279214278D-02 -0.110189740146255D-02 -0.115531683749508D-02 -0.119971036456092D-02 -0.123392724837733D-02 -0.125681675564790D-02 -0.126722815344060D-02 -0.126401070833025D-02 -0.124601368528142D-02 -0.121208634624791D-02 -0.116107794846488D-02 -0.109183774240959D-02 -0.100321496940693D-02 -0.894058858855763D-03 -0.763218625052128D-03 -0.609543463585386D-03 -0.431882547283384D-03 -0.229085021682697D-03 0.000000000000000D+00 0.256554633128918D-03 0.529669023235144D-03 0.808464315834393D-03 0.108206159166928D-02 0.133958199020829D-02 0.157014682352793D-02 0.176287766038594D-02 0.190689636029331D-02 0.199132503739235D-02 0.200528593394801D-02 0.193790118325912D-02 0.177829244179592D-02 0.151558037036961D-02 0.113888394413933D-02 0.637319571262856D-03 0.000000000000000D+00 -0.784041162764370D-03 -0.169681991136176D-02 -0.272042010390575D-02 -0.383691936996759D-02 -0.502838923658343D-02 -0.627689571975233D-02 -0.756450029169852D-02 -0.887326113407064D-02 -0.101852345871898D-01 -0.114824767054253D-01 -0.127470448287615D-01 -0.139609990806115D-01 -0.151064037019369D-01 -0.161653281317506D-01 -0.171198477441215D-01 -0.179520441518846D-01 -0.186440049873921D-01 -0.191778230708348D-01 -0.195355948769096D-01 -0.196994182109046D-01 -0.196513890055909D-01 -0.193735971506462D-01 -0.188481212666753D-01 -0.180570223362896D-01 -0.169823361052695D-01 -0.156060641677953D-01 -0.139101636515259D-01 -0.118765354215962D-01 -0.948701072847333D-02 -0.672333623457288D-02 -0.356715737082321D-02 0.000000000000000D+00 0.399707311560124D-02 0.840105435266431D-02 0.131890047197068D-01 0.183378322334310D-01 0.238243775375045D-01 0.296255051152741D-01 0.357181906058069D-01 0.420795971608575D-01 0.486871373116820D-01 0.555185201909656D-01 0.625517850913439D-01 0.697653189254358D-01 0.771378469057060D-01 0.846483766010657D-01 0.922760690838408D-01 0.100000000000000D+00 0.107797824617506D+00 0.115755041988846D+00 0.123957390236730D+00 0.132491475880360D+00 0.141444947693674D+00 0.150906559828701D+00 0.160966147295717D+00 0.171714574370910D+00 0.183243739569440D+00 0.195646733545520D+00 0.209018246657536D+00 0.223455306899893D+00 0.239058390904567D+00 0.255932879724509D+00 0.274190708376287D+00 0.293951878604906D+00 0.315345348203229D+00 0.338508897740792D+00 0.363588085293656D+00 0.390736007373008D+00 0.420120120192521D+00 0.451940731460233D+00 0.486450876562337D+00 0.523965325187679D+00 0.564857344110569D+00 0.609551774548351D+00 0.658535266659527D+00 0.712411651955642D+00 0.772012668820084D+00 0.838527863080890D+00 0.913644720976453D+00 0.100000000000000D+01 0.110207494596726D+01 0.122658701744047D+01 0.139401801632373D+01 0.165376440638830D+01 0.208597536150621D+01 0.277459528572401D+01 0.371522950367823D+01 0.472499177079291D+01 0.555478177657114D+01 0.610333824336571D+01 0.642627931311385D+01 0.661743831670253D+01 0.674621597629721D+01 0.684677638473460D+01 0.692996918708369D+01 0.700000000000000D+01 0.705978367159175D+01 0.711184533142948D+01 0.715789412310019D+01 0.719907726142581D+01 0.723624639368444D+01 0.727010510093773D+01 0.730122436019571D+01 0.733003759357440D+01 0.735688636141685D+01 0.738208625261895D+01 0.740593786320455D+01 0.742872150627160D+01 0.745069587633604D+01 0.747209960253512D+01 0.749315503266478D+01 0.751407255704962D+01 0.753505429778164D+01 0.755629691224247D+01 0.757799383044732D+01 0.760033737845771D+01 0.762352100837971D+01 0.764774136738857D+01 0.767319950704055D+01 0.770010101330177D+01 0.772865479546811D+01 0.775907250046130D+01 0.779160255392066D+01 0.782657940886240D+01 0.786442324921175D+01 0.790560134184621D+01 0.795060002479165D+01 0.800000000000000D+01 0.805463524429539D+01 0.811499856265846D+01 0.818186200394093D+01 0.825649537515921D+01 0.834054417489819D+01 0.843590342404022D+01 0.854563797180108D+01 0.867688920508546D+01 0.884581280766159D+01 0.908256567223050D+01 0.943435513380375D+01 0.996703966130700D+01 0.107597961716560D+02 0.118800889227265D+02 0.133313732139604D+02 0.150000000000000D+02 -0.132697718853994D-03 -0.132308575970949D-03 -0.131141147322407D-03 -0.129195432910141D-03 -0.126471432737053D-03 -0.122969146807110D-03 -0.118688575125233D-03 -0.113629717697174D-03 -0.107792574529354D-03 -0.101177145628675D-03 -0.937834310023002D-04 -0.856114306574130D-04 -0.766611446009367D-04 -0.669325728392339D-04 -0.564257153777708D-04 -0.451405722207565D-04 -0.330771433707513D-04 -0.202354288282463D-04 -0.661542859121522D-05 0.778285734536431D-05 0.229594289900165D-04 0.389142863553051D-04 0.556474294583978D-04 0.731588583216591D-04 0.914485729732750D-04 0.110516573447903D-03 0.130362859787356D-03 0.150987432041308D-03 0.172390290268035D-03 0.194571434535182D-03 0.217530864920561D-03 0.241268581512976D-03 0.265799906674306D-03 0.285249123113762D-03 0.293740513141245D-03 0.291289398599380D-03 0.277895779601933D-03 0.253559656751885D-03 0.218281031043070D-03 0.172059903681372D-03 0.114896275825473D-03 0.467901482471532D-04 -0.322584790888429D-04 -0.122249607525395D-03 -0.223183240294038D-03 -0.335059383176432D-03 -0.457878045246287D-03 -0.591639239691724D-03 -0.736381289582720D-03 -0.877388739506388D-03 -0.999946109943162D-03 -0.110409167871161D-02 -0.118982541929778D-02 -0.125714730680454D-02 -0.130605731973573D-02 -0.133655544139723D-02 -0.134864166091509D-02 -0.134231597387064D-02 -0.131757838255261D-02 -0.127442889582622D-02 -0.121286752861936D-02 -0.113289430102561D-02 -0.103450923702448D-02 -0.917712362818398D-03 -0.782503704786957D-03 -0.628883287057994D-03 -0.456851128695770D-03 -0.266407240506162D-03 -0.575516214588474D-04 0.169715745273455D-03 0.415394896658719D-03 0.679485894532303D-03 0.961988830706594D-03 0.126290383246362D-02 0.158223106843060D-02 0.191997075483839D-02 0.227612316216302D-02 0.265068862214995D-02 0.304366753522151D-02 0.345506037826707D-02 0.388511723849292D-02 0.423735218588115D-02 0.441527746164380D-02 0.441914054747312D-02 0.424894139499120D-02 0.390468185486914D-02 0.338636536142116D-02 0.269399629412309D-02 0.182757901605133D-02 0.787116589237559D-03 -0.427390833065909D-03 -0.181594793721667D-02 -0.337856650311607D-02 -0.511526798125277D-02 -0.702608639285401D-02 -0.911107155311462D-02 -0.113708858722178D-01 -0.135745592908941D-01 -0.154910315291311D-01 -0.171207956688466D-01 -0.184637530614215D-01 -0.195198107982779D-01 -0.202888884409207D-01 -0.207709233145465D-01 -0.209658743639300D-01 -0.208737245708371D-01 -0.204944819325739D-01 -0.198281790014896D-01 -0.188748709854030D-01 -0.176346324091126D-01 -0.161075523374768D-01 -0.142937281610724D-01 -0.121932579461653D-01 -0.980623135160150D-02 -0.713271911613977D-02 -0.417276112055828D-02 -0.926353029450294D-03 0.260656848206667D-02 0.642614191132471D-02 0.105325985148528D-01 0.149262812912468D-01 0.196076653479544D-01 0.245773796299488D-01 0.298362299695931D-01 0.353852233844201D-01 0.412255934961866D-01 0.473588268612010D-01 0.537866898765831D-01 0.605138438913956D-01 0.672084348213145D-01 0.735354528328448D-01 0.794942230461336D-01 0.850829825423809D-01 0.903013830547444D-01 0.951505045464198D-01 0.996327363646678D-01 0.103751573647000D+00 0.107511384240865D+00 0.110917182237296D+00 0.113974389875761D+00 0.116688494514897D+00 0.119064461405040D+00 0.121105777425078D+00 0.122812987191474D+00 0.124174044269319D+00 0.126040335910770D+00 0.129276524953798D+00 0.133891471132107D+00 0.139900459655549D+00 0.147320671586733D+00 0.156169596816347D+00 0.166464116337665D+00 0.178220738189783D+00 0.191457273396887D+00 0.206196056704762D+00 0.222468586834981D+00 0.240321153976254D+00 0.259820582596929D+00 0.281058539773759D+00 0.304151991043174D+00 0.329237118615539D+00 0.356456153087091D+00 0.385941896723412D+00 0.417816877057728D+00 0.452256279190918D+00 0.489637792697798D+00 0.530646050958531D+00 0.576196749819569D+00 0.627251740385858D+00 0.684691594885374D+00 0.749423380391659D+00 0.822879019258327D+00 0.907819217284459D+00 0.100892968900199D+01 0.113305641725096D+01 0.129177709535288D+01 0.150744179992644D+01 0.181269613952377D+01 0.233554456285180D+01 0.341741911158261D+01 0.553565876145984D+01 0.896664703468567D+01 0.130340331373761D+02 0.156031718805512D+02 0.147164181831433D+02 0.110267717805824D+02 0.697198029234167D+01 0.411280058669462D+01 0.255949330546684D+01 0.183470454425655D+01 0.147002568629189D+01 0.122578892212317D+01 0.103851587606443D+01 0.894762651435819D+00 0.784883612067567D+00 0.697855439970652D+00 0.626818164674006D+00 0.568222716095377D+00 0.519823732090089D+00 0.479459941093346D+00 0.445296009769145D+00 0.416389272356369D+00 0.392412014301584D+00 0.373082029221223D+00 0.358064105051945D+00 0.347024770108213D+00 0.339673250629929D+00 0.335783636115934D+00 0.335194120934901D+00 0.337794841542831D+00 0.343516261325391D+00 0.352323729721903D+00 0.364217423459124D+00 0.379231911446865D+00 0.397427989286719D+00 0.418877167305595D+00 0.443642307420461D+00 0.471771897276270D+00 0.503582067620464D+00 0.540055267208800D+00 0.582565562328668D+00 0.632175463870482D+00 0.689414204639206D+00 0.755189265230321D+00 0.832281756029914D+00 0.919988501267682D+00 0.101781407716432D+01 0.113197450000601D+01 0.126945736765813D+01 0.143526439104805D+01 0.164075037522306D+01 0.192788624836194D+01 0.240139868688415D+01 0.324541173716032D+01 0.470833860913723D+01 0.707579191261198D+01 0.106035283028177D+02 0.153043940913559D+02 0.205726163384357D+02 0.249592886181881D+02 0.266980285766332D+02 0.000000000000000D+00 0.124525722574615D-04 0.249051444958727D-04 0.373577166966526D-04 0.498102888421342D-04 0.622628609160576D-04 0.747154329040055D-04 0.871680047938809D-04 0.996205765763491D-04 0.112073148245396D-03 0.124525719798593D-03 0.136978291237797D-03 0.149430862569445D-03 0.161883433805046D-03 0.174336004961771D-03 0.186788576062687D-03 0.199241147137479D-03 0.211693718222682D-03 0.224146289362313D-03 0.236598860608232D-03 0.249051432020638D-03 0.261504003668596D-03 0.273956575630372D-03 0.286409147993990D-03 0.298861720857718D-03 0.311314294330390D-03 0.323766868532093D-03 0.336219443594372D-03 0.348672019660882D-03 0.361124596887818D-03 0.373577175444319D-03 0.386029755512980D-03 0.398972649649571D-03 0.223402276413008D-03 0.483222044664550D-04 -0.126757869806130D-03 -0.301837938112176D-03 -0.476917993089378D-03 -0.651998029592701D-03 -0.827078045981616D-03 -0.100215804540716D-02 -0.117723803709906D-02 -0.135231803765281D-02 -0.152739807231687D-02 -0.170247817627969D-02 -0.187755839595692D-02 -0.205263879027844D-02 -0.222771943197555D-02 -0.240402616453632D-02 -0.210821223302105D-02 -0.181362362095572D-02 -0.151903457963467D-02 -0.122444511912260D-02 -0.929855281093780D-03 -0.635265132704316D-03 -0.340674760463761D-03 -0.460842641077791D-04 0.248506249530156D-03 0.543096672646931D-03 0.837686902597390D-03 0.113227684802239D-02 0.142686643497736D-02 0.172145561305903D-02 0.201604436153546D-02 0.231063269547066D-02 0.260522067185615D-02 0.289980839573500D-02 0.319439602633248D-02 0.348898378318158D-02 0.378357195225210D-02 0.407816089207635D-02 0.437275103987833D-02 0.466734291769899D-02 0.496193713852594D-02 0.525653441241725D-02 0.555113555263226D-02 0.584574148175560D-02 0.614035323782633D-02 0.643497198046358D-02 0.672959899699445D-02 0.703222053023264D-02 0.423929778619064D-02 0.145431103821417D-02 -0.133069229167604D-02 -0.411568058774517D-02 -0.690062469616071D-02 -0.968550309417476D-02 -0.124703070593635D-01 -0.152550458389330D-01 -0.180397518191076D-01 -0.208244856946034D-01 -0.236093416382209D-01 -0.263944524705598D-01 -0.291799948298146D-01 -0.319661943414252D-01 -0.347533307869143D-01 -0.375607274243877D-01 -0.329568219732535D-01 -0.283702896503296D-01 -0.237821628205689D-01 -0.191924737418250D-01 -0.146013738375820D-01 -0.100091107269866D-01 -0.541600522903884D-02 -0.822428351233695D-03 0.377122173020572D-02 0.836454269421694D-02 0.129571511004807D-01 0.175487054142915D-01 0.221389290270020D-01 0.267276332653439D-01 0.313147403795968D-01 0.359003064974299D-01 0.404845445286108D-01 0.450678470061643D-01 0.496508088524434D-01 0.542342500630122D-01 0.588192383055306D-01 0.634071114307266D-01 0.679994998821734D-01 0.725983489624333D-01 0.772059408522088D-01 0.818249161716151D-01 0.864582946970023D-01 0.911094945774633D-01 0.957823489990619D-01 0.100481118681399D+00 0.105210497810827D+00 0.110058430663175D+00 0.104168479094230D+00 0.982960972747386D-01 0.923845495505025D-01 0.864557543294131D-01 0.805330620662188D-01 0.746388256673942D-01 0.687925925165400D-01 0.630102005181001D-01 0.573037384855635D-01 0.516817974002208D-01 0.461488470306843D-01 0.407025014216522D-01 0.353284390629156D-01 0.299936735783177D-01 0.246370389463557D-01 0.189167875446898D-01 0.408045449817322D-01 0.627535043951539D-01 0.849247733107461D-01 0.107362859439380D+00 0.130083922358537D+00 0.153081684989090D+00 0.176342939693107D+00 0.199868959574665D+00 0.223700167052655D+00 0.247940898799349D+00 0.272780065367648D+00 0.298502083153089D+00 0.325479632708522D+00 0.354134996950023D+00 0.384855443671270D+00 0.417868638644393D+00 0.453140464445283D+00 0.490403331916980D+00 0.529596038781150D+00 0.572464829480921D+00 0.623743602739239D+00 0.688520661604201D+00 0.769101701949012D+00 0.864657996172255D+00 0.973417347812244D+00 0.109799978838888D+01 0.125258065534450D+01 0.146550568149172D+01 0.177002941346916D+01 0.220202589049785D+01 0.287703580876371D+01 0.402423473759015D+01 0.574390412952442D+01 0.109872454169727D+02 0.236327401424132D+02 0.441509286536578D+02 0.656406960895690D+02 0.645156591965261D+02 0.176967805850766D+02 -0.460728989021301D+02 -0.719957859798199D+02 -0.577575416438826D+02 -0.337362089368230D+02 -0.159696240624660D+02 -0.722361629626312D+01 -0.444610715860608D+01 -0.336946929479291D+01 -0.262326817908684D+01 -0.197683500902872D+01 -0.153929425075535D+01 -0.124560725634592D+01 -0.102758555314676D+01 -0.847468801369359D+00 -0.701298686799873D+00 -0.590342625095900D+00 -0.502903177278540D+00 -0.422112419930272D+00 -0.345159837822848D+00 -0.273399684748711D+00 -0.207173888668194D+00 -0.146084829531219D+00 -0.891637937738778D-01 -0.353038706739426D-01 0.164393848808686D-01 0.667836745728891D-01 0.116301758469035D+00 0.165537230219343D+00 0.215060969371734D+00 0.265402646235998D+00 0.316871844639309D+00 0.369501851964742D+00 0.422982631710966D+00 0.477164243674906D+00 0.540761207339301D+00 0.626381179487453D+00 0.733948264348328D+00 0.853568584989716D+00 0.978071119609467D+00 0.112673081930620D+01 0.134022888628078D+01 0.146638696132777D+01 0.166403146736457D+01 0.198910206356959D+01 0.241034970129840D+01 0.289547504717893D+01 0.368007644642148D+01 0.550827149402267D+01 0.964412653868794D+01 0.173642910701496D+02 0.294493688331113D+02 0.463091368780806D+02 0.665784276085033D+02 0.838492776247176D+02 0.847338342818357D+02 0.556396786702435D+02 0.000000000000000D+00 SHAR_EOF fi # end of overwriting check if test -f 'res2_2' then echo shar: will not over-write existing file "'res2_2'" else cat << "SHAR_EOF" > 'res2_2' DNSPLIN1 Output Domain: T(1) = 0.000D+00, T(N) = 0.150D+02 Number of data points: N = 11 Number of grid points: M = 241 Mesh width: H = 0.625000D-01 # CG steps between restarts: MAXCG = 3 Line search tolerance: FMTOL = 1.000D-06 Convergence tolerance: PHTOL = 1.000D-03 Max number of iterations: NGMAX = 200 Iteration 1 (Steepest descent) Functional: phi(F) = 1.847022230448302D+01 Mean absolute L2-gradient: GNRM1 = 1.43D+00 Max-norm of L2-gradient: GNRMM = 4.04D+01 Line search: No. phi evals NPHV = 36 Optimal step-size S = 9.945D+00 Functional phi(Y) = 3.108584884343124D+00 Relative change in phi(Y) DPHI = 7.89D-01 Squared relative change in Y: DY = 5.14D-03 Cubed S-gradient rel. to Y: DG = 3.74D-07 _________________________________________________________________ Iteration 2 (Conjugate gradient) Functional: phi(F) = 3.108584884343124D+00 Mean absolute L2-gradient: GNRM1 = 6.23D-01 Max-norm of L2-gradient: GNRMM = 1.18D+01 Line search: No. phi evals NPHV = 32 Optimal step-size S = 1.075D+01 Functional phi(Y) = 2.734542807953708D+00 Relative change in phi(Y) DPHI = 9.10D-02 Squared relative change in Y: DY = 1.53D-04 Cubed S-gradient rel. to Y: DG = 1.76D-09 _________________________________________________________________ Iteration 3 (Conjugate gradient) Functional: phi(F) = 2.734542807953708D+00 Mean absolute L2-gradient: GNRM1 = 1.79D-01 Max-norm of L2-gradient: GNRMM = 2.19D+00 Line search: No. phi evals NPHV = 26 Optimal step-size S = 3.434D-01 Functional phi(Y) = 2.727705979535965D+00 Relative change in phi(Y) DPHI = 1.83D-03 Squared relative change in Y: DY = 3.39D-06 Cubed S-gradient rel. to Y: DG = 2.69D-08 _________________________________________________________________ Iteration 4 (Conjugate gradient) Functional: phi(F) = 2.727705979535965D+00 Mean absolute L2-gradient: GNRM1 = 2.38D-01 Max-norm of L2-gradient: GNRMM = 3.05D+00 Line search: No. phi evals NPHV = 35 Optimal step-size S = 1.140D+01 Functional phi(Y) = 2.440207353380296D+00 Relative change in phi(Y) DPHI = 7.71D-02 Squared relative change in Y: DY = 1.60D-03 Cubed S-gradient rel. to Y: DG = 3.23D-08 _________________________________________________________________ Iteration 5 (Steepest descent) Functional: phi(F) = 2.440207353380296D+00 Mean absolute L2-gradient: GNRM1 = 3.07D-01 Max-norm of L2-gradient: GNRMM = 4.93D+00 Line search: No. phi evals NPHV = 32 Optimal step-size S = 8.656D+00 Functional phi(Y) = 2.305872979351708D+00 Relative change in phi(Y) DPHI = 3.90D-02 Squared relative change in Y: DY = 6.97D-05 Cubed S-gradient rel. to Y: DG = 8.96D-10 _________________________________________________________________ Iteration 6 (Conjugate gradient) Functional: phi(F) = 2.305872979351708D+00 Mean absolute L2-gradient: GNRM1 = 8.71D-02 Max-norm of L2-gradient: GNRMM = 3.01D+00 Line search: No. phi evals NPHV = 28 Optimal step-size S = 8.767D-01 Functional phi(Y) = 2.300097411948204D+00 Relative change in phi(Y) DPHI = 1.75D-03 Squared relative change in Y: DY = 5.12D-06 Cubed S-gradient rel. to Y: DG = 7.79D-09 _________________________________________________________________ Iteration 7 (Conjugate gradient) Functional: phi(F) = 2.300097411948204D+00 Mean absolute L2-gradient: GNRM1 = 8.46D-02 Max-norm of L2-gradient: GNRMM = 2.50D+00 Line search: No. phi evals NPHV = 41 Optimal step-size S = 1.359D+01 Functional phi(Y) = 2.149679131926205D+00 Relative change in phi(Y) DPHI = 4.56D-02 Squared relative change in Y: DY = 1.53D-03 Cubed S-gradient rel. to Y: DG = 1.14D-08 _________________________________________________________________ Iteration 8 (Conjugate gradient) Functional: phi(F) = 2.149679131926205D+00 Mean absolute L2-gradient: GNRM1 = 2.53D-01 Max-norm of L2-gradient: GNRMM = 3.91D+00 Line search: No. phi evals NPHV = 34 Optimal step-size S = 1.549D+01 Functional phi(Y) = 2.058102703980385D+00 Relative change in phi(Y) DPHI = 2.91D-02 Squared relative change in Y: DY = 8.46D-05 Cubed S-gradient rel. to Y: DG = 1.78D-10 _________________________________________________________________ Iteration 9 (Steepest descent) Functional: phi(F) = 2.058102703980385D+00 Mean absolute L2-gradient: GNRM1 = 1.27D-01 Max-norm of L2-gradient: GNRMM = 1.96D+00 Line search: No. phi evals NPHV = 33 Optimal step-size S = 1.182D+01 Functional phi(Y) = 2.024316039436485D+00 Relative change in phi(Y) DPHI = 1.10D-02 Squared relative change in Y: DY = 1.23D-04 Cubed S-gradient rel. to Y: DG = 8.28D-10 _________________________________________________________________ Iteration 10 (Conjugate gradient) Functional: phi(F) = 2.024316039436485D+00 Mean absolute L2-gradient: GNRM1 = 5.30D-02 Max-norm of L2-gradient: GNRMM = 1.17D+00 Line search: No. phi evals NPHV = 36 Optimal step-size S = 3.172D+01 Functional phi(Y) = 1.945852149825856D+00 Relative change in phi(Y) DPHI = 2.59D-02 Squared relative change in Y: DY = 5.80D-04 Cubed S-gradient rel. to Y: DG = 1.16D-10 _________________________________________________________________ Iteration 11 (Conjugate gradient) Functional: phi(F) = 1.945852149825856D+00 Mean absolute L2-gradient: GNRM1 = 1.88D-01 Max-norm of L2-gradient: GNRMM = 2.07D+00 Line search: No. phi evals NPHV = 31 Optimal step-size S = 2.817D+00 Functional phi(Y) = 1.935709121934864D+00 Relative change in phi(Y) DPHI = 3.44D-03 Squared relative change in Y: DY = 9.64D-05 Cubed S-gradient rel. to Y: DG = 1.01D-09 _________________________________________________________________ Iteration 12 (Conjugate gradient) Functional: phi(F) = 1.935709121934864D+00 Mean absolute L2-gradient: GNRM1 = 2.15D-01 Max-norm of L2-gradient: GNRMM = 3.31D+00 Line search: No. phi evals NPHV = 33 Optimal step-size S = 9.001D+00 Functional phi(Y) = 1.904346612904878D+00 Relative change in phi(Y) DPHI = 1.07D-02 Squared relative change in Y: DY = 1.53D-05 Cubed S-gradient rel. to Y: DG = 5.07D-10 _________________________________________________________________ Iteration 13 (Steepest descent) Functional: phi(F) = 1.904346612904878D+00 Mean absolute L2-gradient: GNRM1 = 7.29D-02 Max-norm of L2-gradient: GNRMM = 1.70D+00 Line search: No. phi evals NPHV = 33 Optimal step-size S = 1.537D+01 Functional phi(Y) = 1.889710783473111D+00 Relative change in phi(Y) DPHI = 5.04D-03 Squared relative change in Y: DY = 2.23D-05 Cubed S-gradient rel. to Y: DG = 2.90D-11 _________________________________________________________________ Iteration 14 (Conjugate gradient) Functional: phi(F) = 1.889710783473111D+00 Mean absolute L2-gradient: GNRM1 = 3.98D-02 Max-norm of L2-gradient: GNRMM = 1.05D+00 Line search: No. phi evals NPHV = 28 Optimal step-size S = 1.153D+00 Functional phi(Y) = 1.888299483028042D+00 Relative change in phi(Y) DPHI = 4.88D-04 Squared relative change in Y: DY = 3.55D-06 Cubed S-gradient rel. to Y: DG = 4.35D-10 _________________________________________________________________ Number of descent iterations: 14 Total number of phi evaluations in the line searches: 458 Total polygonal curve length: 0.269D+02 SHAR_EOF fi # end of overwriting check if test -f 'res3' then echo shar: will not over-write existing file "'res3'" else cat << "SHAR_EOF" > 'res3' 241 0.000000000000000D+00 -0.110456043980527D-03 0.276429000000000D-03 0.363011354142413D+00 0.437498000000000D+00 0.518102479325958D+00 0.605697628640129D+00 0.701177440451447D+00 0.805646612391611D+00 0.920375547242582D+00 0.104678744744440D+01 0.118639510983502D+01 0.134048964157918D+01 0.150945886869131D+01 0.169183000000000D+01 0.188336774314587D+01 0.208575933679729D+01 0.230112181660128D+01 0.253222892630577D+01 0.278290973888038D+01 0.305873896016464D+01 0.336825631653346D+01 0.372521790596214D+01 0.415302698141877D+01 0.469428000000000D+01 0.543523158752537D+01 0.631042810949362D+01 0.715382535897424D+01 0.781406264920606D+01 0.825648368619995D+01 0.853386330051491D+01 0.871473773833650D+01 0.884865256117302D+01 0.895909440718620D+01 0.905389273902603D+01 0.913674633064196D+01 0.921021630217112D+01 0.927576926606744D+01 0.933458241574492D+01 0.938809031816165D+01 0.943740000000000D+01 0.948283287041297D+01 0.952447762277589D+01 0.956271647539924D+01 0.959798896991196D+01 0.963065119367581D+01 0.966096619593540D+01 0.968913614425881D+01 0.971532808070444D+01 0.973968638275592D+01 0.976233774649545D+01 0.978339356316406D+01 0.980295168866307D+01 0.982109810738432D+01 0.983790859566534D+01 0.985345050110046D+01 0.986778479090370D+01 0.988096836874172D+01 0.989305627932493D+01 0.990410322165222D+01 0.991416414577728D+01 0.992329418528849D+01 0.993154828494784D+01 0.993898076220026D+01 0.994564492769958D+01 0.995159281849540D+01 0.995687505132051D+01 0.996154077806361D+01 0.996563771703293D+01 0.996921223520413D+01 0.997230946227994D+01 0.997497342346796D+01 0.997724718282284D+01 0.997917299240644D+01 0.998079244453171D+01 0.998214662527743D+01 0.998327626758764D+01 0.998422190184311D+01 0.998502400100724D+01 0.998572311649474D+01 0.998636000000000D+01 0.998697621434307D+01 0.998757205500572D+01 0.998814818589818D+01 0.998870519065663D+01 0.998924358372308D+01 0.998976382069310D+01 0.999026630783865D+01 0.999075141075329D+01 0.999121946209821D+01 0.999167076845120D+01 0.999210561627993D+01 0.999252427707670D+01 0.999292701170386D+01 0.999331407400975D+01 0.999368571378268D+01 0.999404217911610D+01 0.999438371826058D+01 0.999471058103977D+01 0.999502301990475D+01 0.999532129069788D+01 0.999560565319102D+01 0.999587637145626D+01 0.999613371411871D+01 0.999637795453268D+01 0.999660937091357D+01 0.999682824645004D+01 0.999703486941265D+01 0.999722953326933D+01 0.999741253681153D+01 0.999758418429083D+01 0.999774478556201D+01 0.999789465622631D+01 0.999803411776673D+01 0.999816349766694D+01 0.999828312950496D+01 0.999839335301334D+01 0.999849451409863D+01 0.999858696481370D+01 0.999867106327821D+01 0.999874717354363D+01 0.999881566540090D+01 0.999887691412996D+01 0.999893130019199D+01 0.999897920886602D+01 0.999902102983328D+01 0.999905715671291D+01 0.999908798655398D+01 0.999911391928945D+01 0.999913535715793D+01 0.999915270409993D+01 0.999916636513545D+01 0.999917674572995D+01 0.999918425115589D+01 0.999918928585729D+01 0.999919225282401D+01 0.999919355298313D+01 0.999919358461382D+01 0.999919274279199D+01 0.999919141887050D+01 0.999919000000000D+01 0.999918883273269D+01 0.999918794353248D+01 0.999918732449705D+01 0.999918696822138D+01 0.999918686776997D+01 0.999918701665022D+01 0.999918740878706D+01 0.999918803849859D+01 0.999918890047285D+01 0.999918998974565D+01 0.999919130167930D+01 0.999919283194240D+01 0.999919457649050D+01 0.999919653154761D+01 0.999919869358862D+01 0.999920105932244D+01 0.999920362567598D+01 0.999920638977885D+01 0.999920934894872D+01 0.999921250067741D+01 0.999921584261756D+01 0.999921937256998D+01 0.999922308847150D+01 0.999922698838346D+01 0.999923107048063D+01 0.999923533304072D+01 0.999923977443435D+01 0.999924439311544D+01 0.999924918761202D+01 0.999925415651760D+01 0.999925929848274D+01 0.999926461220712D+01 0.999927009643195D+01 0.999927574993270D+01 0.999928157151223D+01 0.999928755999414D+01 0.999929371421651D+01 0.999930003302588D+01 0.999930651527156D+01 0.999931315980016D+01 0.999931996545041D+01 0.999932693104830D+01 0.999933405540231D+01 0.999934133729903D+01 0.999934877549895D+01 0.999935636873246D+01 0.999936411569613D+01 0.999937201504912D+01 0.999938006540989D+01 0.999938826535304D+01 0.999939661340644D+01 0.999940510804842D+01 0.999941374770533D+01 0.999942253074916D+01 0.999943145549536D+01 0.999944052020094D+01 0.999944972306262D+01 0.999945906221528D+01 0.999946853573048D+01 0.999947814161530D+01 0.999948787781113D+01 0.999949774219288D+01 0.999950773256818D+01 0.999951784667679D+01 0.999952808219023D+01 0.999953843671150D+01 0.999954890777499D+01 0.999955949284652D+01 0.999957018932357D+01 0.999958099453564D+01 0.999959190574473D+01 0.999960292014605D+01 0.999961403486871D+01 0.999962524697675D+01 0.999963655347013D+01 0.999964795128598D+01 0.999965943729982D+01 0.999967100832714D+01 0.999968266112484D+01 0.999969439239299D+01 0.999970619877655D+01 0.999971807686731D+01 0.999973002320588D+01 0.999974203428379D+01 0.999975410654567D+01 0.999976623639155D+01 0.999977842017920D+01 0.999979065422661D+01 0.999980293481448D+01 0.999981525818884D+01 0.999982762056367D+01 0.999984001812370D+01 0.999985244702706D+01 0.999986490340821D+01 0.999987738338075D+01 0.999988988304035D+01 0.999990239846766D+01 0.999991492573133D+01 0.999992746089093D+01 0.999994000000000D+01 -0.220912087961053D-02 0.276429000000000D-02 0.363121810186393D+01 0.437221571000000D+01 0.155091125183546D+01 0.168199628640129D+01 0.183074961125489D+01 0.199948983751482D+01 0.219198106791135D+01 0.241140835052790D+01 0.266019562592441D+01 0.293702194134781D+01 0.323063758856291D+01 0.351340358420817D+01 0.373908874454554D+01 0.393929336797291D+01 0.417754073455410D+01 0.446469589508483D+01 0.481787922279103D+01 0.526510033858870D+01 0.585346577653076D+01 0.666478945797500D+01 0.784770664885313D+01 0.969062094037855D+01 0.128220460610660D+02 0.161614810949362D+02 0.171859377144887D+02 0.150363453971244D+02 0.110265832722571D+02 0.719800651308848D+01 0.458254052136553D+01 0.314789260658104D+01 0.244356668849692D+01 0.205240177853009D+01 0.177651923455763D+01 0.156323563145097D+01 0.139022935425485D+01 0.124366113573801D+01 0.112321052094202D+01 0.102817584255076D+01 0.947425522513221D+00 0.870776227758920D+00 0.798836049862750D+00 0.735113471360709D+00 0.679347182765628D+00 0.629772260234382D+00 0.584849505830078D+00 0.543618847690368D+00 0.505502384971042D+00 0.470096657910091D+00 0.437071804081413D+00 0.406139421676226D+00 0.377045442202579D+00 0.349569070022664D+00 0.323523937161383D+00 0.298761952383675D+00 0.275178676412668D+00 0.252714884212235D+00 0.231348529105020D+00 0.211078664523523D+00 0.191909636362695D+00 0.173841391705576D+00 0.156865769117633D+00 0.140966427517437D+00 0.126120562951417D+00 0.112301236209333D+00 0.994795956820660D-01 0.876266571241935D-01 0.767145714052475D-01 0.667174524700798D-01 0.576118826382910D-01 0.493772054289821D-01 0.419956893847662D-01 0.354526170887048D-01 0.297363287099017D-01 0.248382305592720D-01 0.207527656568196D-01 0.174773341960410D-01 0.150121465162911D-01 0.133599899275794D-01 0.125309784833583D-01 0.121205500571619D-01 0.117197155510418D-01 0.113313565091744D-01 0.109539782490486D-01 0.105863003646967D-01 0.102272411556292D-01 0.987590060185894D-02 0.953154259565991D-02 0.919357697906520D-02 0.886154181717558D-02 0.853508625509036D-02 0.821395423933780D-02 0.789796933041487D-02 0.758702078821116D-02 0.728105106350796D-02 0.698004477893477D-02 0.668401923670459D-02 0.639301644175916D-02 0.610709658117159D-02 0.582633286271061D-02 0.555080758374515D-02 0.528060927686980D-02 0.501583076417234D-02 0.475656794863610D-02 0.450291917363899D-02 0.425498499078358D-02 0.401286819288416D-02 0.377667398879566D-02 0.354651021497787D-02 0.332248750476438D-02 0.310471935488721D-02 0.289332204724602D-02 0.268841440629330D-02 0.249011738221228D-02 0.229855346391972D-02 0.211384593674424D-02 0.193611800368032D-02 0.176549179579766D-02 0.160208729925060D-02 0.144602122691850D-02 0.129740586334748D-02 0.115634791084673D-02 0.102294736052500D-02 0.897296412958326D-03 0.779478468899697D-03 0.669567206994515D-03 0.567625765448554D-03 0.473706039496591D-03 0.387848104796973D-03 0.310079775243111D-03 0.240416300165691D-03 0.178860204371745D-03 0.125401273454173D-03 0.800166811387726D-04 0.426712584022937D-04 0.133178981798210D-04 -0.810191142619487D-05 -0.216574332512209D-04 -0.274279198997363D-04 -0.258613781056738D-04 -0.205646752426958D-04 -0.150823563771496D-04 -0.975311092332731D-05 -0.456727084596764D-05 0.484288378288511D-06 0.541017094235485D-05 0.102184836592301D-04 0.149168579177683D-04 0.195124706436900D-04 0.240120644434683D-04 0.284219675172892D-04 0.327481120443451D-04 0.369960521062751D-04 0.411709812020433D-04 0.452777482706779D-04 0.493208735719008D-04 0.533045640693786D-04 0.572327274461770D-04 0.611089855873104D-04 0.649366883820335D-04 0.687189257142506D-04 0.724585394351607D-04 0.761581348029949D-04 0.798200912122127D-04 0.834465725851885D-04 0.870395372665200D-04 0.906007471890291D-04 0.941317766667282D-04 0.976340216674032D-04 0.101108707220021D-03 0.104556895124119D-03 0.107979492049992D-03 0.111377255826994D-03 0.114750802833186D-03 0.118100614407979D-03 0.121427042838462D-03 0.124730317452304D-03 0.128010550497493D-03 0.131267742720098D-03 0.134501788515706D-03 0.137712481453889D-03 0.140899518932258D-03 0.144062507292375D-03 0.147200966438277D-03 0.150314334330659D-03 0.153401971818568D-03 0.156463166600673D-03 0.159497137524056D-03 0.162503039202733D-03 0.165479965499316D-03 0.168426953717216D-03 0.171342988970480D-03 0.174227007416761D-03 0.177077900289646D-03 0.179894517824408D-03 0.182675672562027D-03 0.185420143363757D-03 0.188126678661860D-03 0.190794000207717D-03 0.193420806464673D-03 0.196005775787711D-03 0.198547570473551D-03 0.201044839105435D-03 0.203496220496646D-03 0.205900347154397D-03 0.208255847624628D-03 0.210561350151295D-03 0.212815485767237D-03 0.215016891189634D-03 0.217164211662180D-03 0.219256104116994D-03 0.221291239803634D-03 0.223268307024682D-03 0.225186014191081D-03 0.227043092255741D-03 0.228838296845169D-03 0.230570411599018D-03 0.232238250248429D-03 0.233840658552253D-03 0.235376517032648D-03 0.236844743142228D-03 0.238244293306877D-03 0.239574164861978D-03 0.240833397970874D-03 0.242021077614396D-03 0.243136335296157D-03 0.244178350605750D-03 0.245146352781944D-03 0.246039622258110D-03 0.246857491923436D-03 0.247599348615068D-03 0.248264633881945D-03 0.248852845103897D-03 0.249363536841685D-03 0.249796321387663D-03 0.250150869192112D-03 0.250426909804702D-03 0.250624232620567D-03 0.250742686702665D-03 0.250782181474563D-03 0.000000000000000D+00 0.198936435184421D+00 0.144939216039373D+03 -0.115299311713930D+03 0.244713338734834D+01 0.279626799528521D+01 0.315386499885872D+01 0.359574405153817D+01 0.410390516432320D+01 0.467318614033894D+01 0.527830487552143D+01 0.579474774141468D+01 0.594987814718921D+01 0.536076167862118D+01 0.366664473487344D+01 0.434154020222142D+01 0.518835446102628D+01 0.629785196020300D+01 0.782948114804487D+01 0.100593634838619D+02 0.134752540338203D+02 0.189776932239496D+02 0.283389944111752D+02 0.453775772498419D+02 0.798794275776576D+02 0.536979737771499D+02 -0.127197089950531D+02 -0.732639836995162D+02 -0.871265012951756D+02 -0.660165690715701D+02 -0.386020705973479D+02 -0.187838459940316D+02 -0.938919072933331D+01 -0.625740566933999D+01 -0.477789608955845D+01 -0.375344803470767D+01 -0.316680305313710D+01 -0.269592568753652D+01 -0.212209890430302D+01 -0.167928823134744D+01 -0.155072457015422D+01 -0.151524722001781D+01 -0.136235989582900D+01 -0.118654324425265D+01 -0.104410829955057D+01 -0.938888601699261D+00 -0.858021574472900D+00 -0.791204751115515D+00 -0.733453757657543D+00 -0.682775324780493D+00 -0.638218828366632D+00 -0.599076467840831D+00 -0.564682711105036D+00 -0.534372176091580D+00 -0.507433138359659D+00 -0.483046252748664D+00 -0.460284786091591D+00 -0.438266901925743D+00 -0.416387302362864D+00 -0.394407280897013D+00 -0.372353845536111D+00 -0.350375940748648D+00 -0.328648962769051D+00 -0.307324701238798D+00 -0.286509881401997D+00 -0.266263188281357D+00 -0.246602432809340D+00 -0.227515109505561D+00 -0.208968319252278D+00 -0.190916438154431D+00 -0.173306355117120D+00 -0.156080733255237D+00 -0.139179908513398D+00 -0.122542983329055D+00 -0.106108551823070D+00 -0.898153742021179D-01 -0.736032218959792D-01 -0.574140365351639D-01 -0.411934706548322D-01 -0.248927928936382D-01 -0.826766487520558D-02 -0.814947217264716D-02 -0.788390807215933D-02 -0.765045360253680D-02 -0.744467680249272D-02 -0.726243857158693D-02 -0.709992979111007D-02 -0.695369235970133D-02 -0.682062788825988D-02 -0.669799677552874D-02 -0.658340970005611D-02 -0.647481278335249D-02 -0.637046784675022D-02 -0.626892851016691D-02 -0.616901317798124D-02 -0.606977581014689D-02 -0.597047557278074D-02 -0.587054611642657D-02 -0.576956568139053D-02 -0.566722874211223D-02 -0.556331999632675D-02 -0.545769116229167D-02 -0.535024111272264D-02 -0.524089939517580D-02 -0.512961322627348D-02 -0.501633777361121D-02 -0.490102954060489D-02 -0.478364237537221D-02 -0.466412578816744D-02 -0.454242516454428D-02 -0.441848324399530D-02 -0.429224275109163D-02 -0.416364955455606D-02 -0.403265608355241D-02 -0.389922487968874D-02 -0.376333185201361D-02 -0.362496923500544D-02 -0.348414808755137D-02 -0.334090022775513D-02 -0.319527963412725D-02 -0.304736325915655D-02 -0.289725128368445D-02 -0.274506681634534D-02 -0.259095519652419D-02 -0.243508270614257D-02 -0.227763505620260D-02 -0.211881542000469D-02 -0.195884224183374D-02 -0.179794679624479D-02 -0.163637059173993D-02 -0.147436259041456D-02 -0.131217641268222D-02 -0.115006741907564D-02 -0.988289817627219D-03 -0.827093874988804D-03 -0.666723034470351D-03 -0.507411374428557D-03 -0.349381009812077D-03 -0.192839863188965D-03 -0.379796027516477D-04 0.100641274514146D-03 0.111226840004974D-03 0.108065914616873D-03 0.105103903536019D-03 0.102329699558368D-03 0.997326694118783D-04 0.973026331507754D-04 0.950298755242329D-04 0.929050948172971D-04 0.909194142195702D-04 0.890643377715605D-04 0.873317851812771D-04 0.857139959009601D-04 0.842036065762386D-04 0.827935572544902D-04 0.814771254908919D-04 0.802478865580269D-04 0.790997333410814D-04 0.780268017308572D-04 0.770235239144767D-04 0.760845878744476D-04 0.752049054142390D-04 0.743796434221622D-04 0.736041712912083D-04 0.728740850775011D-04 0.721851698415321D-04 0.715334174117288D-04 0.709149794886343D-04 0.703261996193305D-04 0.697636004076685D-04 0.692238216970509D-04 0.687036944668762D-04 0.682001825680345D-04 0.677103685120528D-04 0.672315117355993D-04 0.667609512561285D-04 0.662961859632105D-04 0.658347985904584D-04 0.653745232170877D-04 0.649131656871304D-04 0.644486661371957D-04 0.639790513901062D-04 0.635024477446677D-04 0.630170866600110D-04 0.625212791760532D-04 0.620134365192371D-04 0.614920629971038D-04 0.609557282871265D-04 0.604031086481882D-04 0.598329584988733D-04 0.592440933644411D-04 0.586354353515617D-04 0.580059747790074D-04 0.573547630722260D-04 0.566809518431910D-04 0.559837495472948D-04 0.552624399574597D-04 0.545163921117364D-04 0.537450198123679D-04 0.529478420219220D-04 0.521244082563044D-04 0.512743646652325D-04 0.503974227683557D-04 0.494933225070326D-04 0.485619331414000D-04 0.476031331686499D-04 0.466168856405602D-04 0.456032154261265D-04 0.445622092115627D-04 0.434940076843304D-04 0.423988112174811D-04 0.412768869750835D-04 0.401285404905138D-04 0.389541483514222D-04 0.377541383045354D-04 0.365289842818583D-04 0.352791992952461D-04 0.340053908587379D-04 0.327081551176889D-04 0.313881770352964D-04 0.300461621804970D-04 0.286828822027019D-04 0.272991243832621D-04 0.258957378207469D-04 0.244735865351231D-04 0.230335992057462D-04 0.215767080646856D-04 0.201039043190576D-04 0.186161827286924D-04 0.171145963179242D-04 0.156001902951175D-04 0.140740773701964D-04 0.125373333048628D-04 0.109911155732334D-04 0.943655393825793D-05 0.787482790087779D-05 0.630708427706850D-05 0.473454022653641D-05 0.315837240805195D-05 0.157979087589410D-05 0.000000000000000D+00 SHAR_EOF fi # end of overwriting check if test -f 'res3_1' then echo shar: will not over-write existing file "'res3_1'" else cat << "SHAR_EOF" > 'res3_1' 241 0.000000000000000D+00 -0.110456043980527D-03 0.276429000000000D-03 0.363011354142413D+00 0.437498000000000D+00 0.518102479325958D+00 0.605697628640129D+00 0.701177440451447D+00 0.805646612391611D+00 0.920375547242582D+00 0.104678744744440D+01 0.118639510983502D+01 0.134048964157918D+01 0.150945886869131D+01 0.169183000000000D+01 0.188336774314587D+01 0.208575933679729D+01 0.230112181660128D+01 0.253222892630577D+01 0.278290973888038D+01 0.305873896016464D+01 0.336825631653346D+01 0.372521790596214D+01 0.415302698141877D+01 0.469428000000000D+01 0.543523158752537D+01 0.631042810949362D+01 0.715382535897424D+01 0.781406264920606D+01 0.825648368619995D+01 0.853386330051491D+01 0.871473773833650D+01 0.884865256117302D+01 0.895909440718620D+01 0.905389273902603D+01 0.913674633064196D+01 0.921021630217112D+01 0.927576926606744D+01 0.933458241574492D+01 0.938809031816165D+01 0.943740000000000D+01 0.948283287041297D+01 0.952447762277589D+01 0.956271647539924D+01 0.959798896991196D+01 0.963065119367581D+01 0.966096619593540D+01 0.968913614425881D+01 0.971532808070444D+01 0.973968638275592D+01 0.976233774649545D+01 0.978339356316406D+01 0.980295168866307D+01 0.982109810738432D+01 0.983790859566534D+01 0.985345050110046D+01 0.986778479090370D+01 0.988096836874172D+01 0.989305627932493D+01 0.990410322165222D+01 0.991416414577728D+01 0.992329418528849D+01 0.993154828494784D+01 0.993898076220026D+01 0.994564492769958D+01 0.995159281849540D+01 0.995687505132051D+01 0.996154077806361D+01 0.996563771703293D+01 0.996921223520413D+01 0.997230946227994D+01 0.997497342346796D+01 0.997724718282284D+01 0.997917299240644D+01 0.998079244453171D+01 0.998214662527743D+01 0.998327626758764D+01 0.998422190184311D+01 0.998502400100724D+01 0.998572311649474D+01 0.998636000000000D+01 0.998697621434307D+01 0.998757205500572D+01 0.998814818589818D+01 0.998870519065663D+01 0.998924358372308D+01 0.998976382069310D+01 0.999026630783865D+01 0.999075141075329D+01 0.999121946209821D+01 0.999167076845120D+01 0.999210561627993D+01 0.999252427707670D+01 0.999292701170386D+01 0.999331407400975D+01 0.999368571378268D+01 0.999404217911610D+01 0.999438371826058D+01 0.999471058103977D+01 0.999502301990475D+01 0.999532129069788D+01 0.999560565319102D+01 0.999587637145626D+01 0.999613371411871D+01 0.999637795453268D+01 0.999660937091357D+01 0.999682824645004D+01 0.999703486941265D+01 0.999722953326933D+01 0.999741253681153D+01 0.999758418429083D+01 0.999774478556201D+01 0.999789465622631D+01 0.999803411776673D+01 0.999816349766694D+01 0.999828312950496D+01 0.999839335301334D+01 0.999849451409863D+01 0.999858696481370D+01 0.999867106327821D+01 0.999874717354363D+01 0.999881566540090D+01 0.999887691412996D+01 0.999893130019199D+01 0.999897920886602D+01 0.999902102983328D+01 0.999905715671291D+01 0.999908798655398D+01 0.999911391928945D+01 0.999913535715793D+01 0.999915270409993D+01 0.999916636513545D+01 0.999917674572995D+01 0.999918425115589D+01 0.999918928585729D+01 0.999919225282401D+01 0.999919355298313D+01 0.999919358461382D+01 0.999919274279199D+01 0.999919141887050D+01 0.999919000000000D+01 0.999918883273269D+01 0.999918794353248D+01 0.999918732449705D+01 0.999918696822138D+01 0.999918686776997D+01 0.999918701665022D+01 0.999918740878706D+01 0.999918803849859D+01 0.999918890047285D+01 0.999918998974565D+01 0.999919130167930D+01 0.999919283194240D+01 0.999919457649050D+01 0.999919653154761D+01 0.999919869358862D+01 0.999920105932244D+01 0.999920362567598D+01 0.999920638977885D+01 0.999920934894872D+01 0.999921250067741D+01 0.999921584261756D+01 0.999921937256998D+01 0.999922308847150D+01 0.999922698838346D+01 0.999923107048063D+01 0.999923533304072D+01 0.999923977443435D+01 0.999924439311544D+01 0.999924918761202D+01 0.999925415651760D+01 0.999925929848274D+01 0.999926461220712D+01 0.999927009643195D+01 0.999927574993270D+01 0.999928157151223D+01 0.999928755999414D+01 0.999929371421651D+01 0.999930003302588D+01 0.999930651527156D+01 0.999931315980016D+01 0.999931996545041D+01 0.999932693104830D+01 0.999933405540231D+01 0.999934133729903D+01 0.999934877549895D+01 0.999935636873246D+01 0.999936411569613D+01 0.999937201504912D+01 0.999938006540989D+01 0.999938826535304D+01 0.999939661340644D+01 0.999940510804842D+01 0.999941374770533D+01 0.999942253074916D+01 0.999943145549536D+01 0.999944052020094D+01 0.999944972306262D+01 0.999945906221528D+01 0.999946853573048D+01 0.999947814161530D+01 0.999948787781113D+01 0.999949774219288D+01 0.999950773256818D+01 0.999951784667679D+01 0.999952808219023D+01 0.999953843671150D+01 0.999954890777499D+01 0.999955949284652D+01 0.999957018932357D+01 0.999958099453564D+01 0.999959190574473D+01 0.999960292014605D+01 0.999961403486871D+01 0.999962524697675D+01 0.999963655347013D+01 0.999964795128598D+01 0.999965943729982D+01 0.999967100832714D+01 0.999968266112484D+01 0.999969439239299D+01 0.999970619877655D+01 0.999971807686731D+01 0.999973002320588D+01 0.999974203428379D+01 0.999975410654567D+01 0.999976623639155D+01 0.999977842017920D+01 0.999979065422661D+01 0.999980293481448D+01 0.999981525818884D+01 0.999982762056367D+01 0.999984001812370D+01 0.999985244702706D+01 0.999986490340821D+01 0.999987738338075D+01 0.999988988304035D+01 0.999990239846766D+01 0.999991492573133D+01 0.999992746089093D+01 0.999994000000000D+01 -0.220912087961053D-02 0.276429000000000D-02 0.363121810186393D+01 0.437221571000000D+01 0.155091125183546D+01 0.168199628640129D+01 0.183074961125489D+01 0.199948983751482D+01 0.219198106791135D+01 0.241140835052790D+01 0.266019562592441D+01 0.293702194134781D+01 0.323063758856291D+01 0.351340358420817D+01 0.373908874454554D+01 0.393929336797291D+01 0.417754073455410D+01 0.446469589508483D+01 0.481787922279103D+01 0.526510033858870D+01 0.585346577653076D+01 0.666478945797500D+01 0.784770664885313D+01 0.969062094037855D+01 0.128220460610660D+02 0.161614810949362D+02 0.171859377144887D+02 0.150363453971244D+02 0.110265832722571D+02 0.719800651308848D+01 0.458254052136553D+01 0.314789260658104D+01 0.244356668849692D+01 0.205240177853009D+01 0.177651923455763D+01 0.156323563145097D+01 0.139022935425485D+01 0.124366113573801D+01 0.112321052094202D+01 0.102817584255076D+01 0.947425522513221D+00 0.870776227758920D+00 0.798836049862750D+00 0.735113471360709D+00 0.679347182765628D+00 0.629772260234382D+00 0.584849505830078D+00 0.543618847690368D+00 0.505502384971042D+00 0.470096657910091D+00 0.437071804081413D+00 0.406139421676226D+00 0.377045442202579D+00 0.349569070022664D+00 0.323523937161383D+00 0.298761952383675D+00 0.275178676412668D+00 0.252714884212235D+00 0.231348529105020D+00 0.211078664523523D+00 0.191909636362695D+00 0.173841391705576D+00 0.156865769117633D+00 0.140966427517437D+00 0.126120562951417D+00 0.112301236209333D+00 0.994795956820660D-01 0.876266571241935D-01 0.767145714052475D-01 0.667174524700798D-01 0.576118826382910D-01 0.493772054289821D-01 0.419956893847662D-01 0.354526170887048D-01 0.297363287099017D-01 0.248382305592720D-01 0.207527656568196D-01 0.174773341960410D-01 0.150121465162911D-01 0.133599899275794D-01 0.125309784833583D-01 0.121205500571619D-01 0.117197155510418D-01 0.113313565091744D-01 0.109539782490486D-01 0.105863003646967D-01 0.102272411556292D-01 0.987590060185894D-02 0.953154259565991D-02 0.919357697906520D-02 0.886154181717558D-02 0.853508625509036D-02 0.821395423933780D-02 0.789796933041487D-02 0.758702078821116D-02 0.728105106350796D-02 0.698004477893477D-02 0.668401923670459D-02 0.639301644175916D-02 0.610709658117159D-02 0.582633286271061D-02 0.555080758374515D-02 0.528060927686980D-02 0.501583076417234D-02 0.475656794863610D-02 0.450291917363899D-02 0.425498499078358D-02 0.401286819288416D-02 0.377667398879566D-02 0.354651021497787D-02 0.332248750476438D-02 0.310471935488721D-02 0.289332204724602D-02 0.268841440629330D-02 0.249011738221228D-02 0.229855346391972D-02 0.211384593674424D-02 0.193611800368032D-02 0.176549179579766D-02 0.160208729925060D-02 0.144602122691850D-02 0.129740586334748D-02 0.115634791084673D-02 0.102294736052500D-02 0.897296412958326D-03 0.779478468899697D-03 0.669567206994515D-03 0.567625765448554D-03 0.473706039496591D-03 0.387848104796973D-03 0.310079775243111D-03 0.240416300165691D-03 0.178860204371745D-03 0.125401273454173D-03 0.800166811387726D-04 0.426712584022937D-04 0.133178981798210D-04 -0.810191142619487D-05 -0.216574332512209D-04 -0.274279198997363D-04 -0.258613781056738D-04 -0.205646752426958D-04 -0.150823563771496D-04 -0.975311092332731D-05 -0.456727084596764D-05 0.484288378288511D-06 0.541017094235485D-05 0.102184836592301D-04 0.149168579177683D-04 0.195124706436900D-04 0.240120644434683D-04 0.284219675172892D-04 0.327481120443451D-04 0.369960521062751D-04 0.411709812020433D-04 0.452777482706779D-04 0.493208735719008D-04 0.533045640693786D-04 0.572327274461770D-04 0.611089855873104D-04 0.649366883820335D-04 0.687189257142506D-04 0.724585394351607D-04 0.761581348029949D-04 0.798200912122127D-04 0.834465725851885D-04 0.870395372665200D-04 0.906007471890291D-04 0.941317766667282D-04 0.976340216674032D-04 0.101108707220021D-03 0.104556895124119D-03 0.107979492049992D-03 0.111377255826994D-03 0.114750802833186D-03 0.118100614407979D-03 0.121427042838462D-03 0.124730317452304D-03 0.128010550497493D-03 0.131267742720098D-03 0.134501788515706D-03 0.137712481453889D-03 0.140899518932258D-03 0.144062507292375D-03 0.147200966438277D-03 0.150314334330659D-03 0.153401971818568D-03 0.156463166600673D-03 0.159497137524056D-03 0.162503039202733D-03 0.165479965499316D-03 0.168426953717216D-03 0.171342988970480D-03 0.174227007416761D-03 0.177077900289646D-03 0.179894517824408D-03 0.182675672562027D-03 0.185420143363757D-03 0.188126678661860D-03 0.190794000207717D-03 0.193420806464673D-03 0.196005775787711D-03 0.198547570473551D-03 0.201044839105435D-03 0.203496220496646D-03 0.205900347154397D-03 0.208255847624628D-03 0.210561350151295D-03 0.212815485767237D-03 0.215016891189634D-03 0.217164211662180D-03 0.219256104116994D-03 0.221291239803634D-03 0.223268307024682D-03 0.225186014191081D-03 0.227043092255741D-03 0.228838296845169D-03 0.230570411599018D-03 0.232238250248429D-03 0.233840658552253D-03 0.235376517032648D-03 0.236844743142228D-03 0.238244293306877D-03 0.239574164861978D-03 0.240833397970874D-03 0.242021077614396D-03 0.243136335296157D-03 0.244178350605750D-03 0.245146352781944D-03 0.246039622258110D-03 0.246857491923436D-03 0.247599348615068D-03 0.248264633881945D-03 0.248852845103897D-03 0.249363536841685D-03 0.249796321387663D-03 0.250150869192112D-03 0.250426909804702D-03 0.250624232620567D-03 0.250742686702665D-03 0.250782181474563D-03 0.000000000000000D+00 0.198936435184421D+00 0.144939216039373D+03 -0.115299311713930D+03 0.244713338734834D+01 0.279626799528521D+01 0.315386499885872D+01 0.359574405153817D+01 0.410390516432320D+01 0.467318614033894D+01 0.527830487552143D+01 0.579474774141468D+01 0.594987814718921D+01 0.536076167862118D+01 0.366664473487344D+01 0.434154020222142D+01 0.518835446102628D+01 0.629785196020300D+01 0.782948114804487D+01 0.100593634838619D+02 0.134752540338203D+02 0.189776932239496D+02 0.283389944111752D+02 0.453775772498419D+02 0.798794275776576D+02 0.536979737771499D+02 -0.127197089950531D+02 -0.732639836995162D+02 -0.871265012951756D+02 -0.660165690715701D+02 -0.386020705973479D+02 -0.187838459940316D+02 -0.938919072933331D+01 -0.625740566933999D+01 -0.477789608955845D+01 -0.375344803470767D+01 -0.316680305313710D+01 -0.269592568753652D+01 -0.212209890430302D+01 -0.167928823134744D+01 -0.155072457015422D+01 -0.151524722001781D+01 -0.136235989582900D+01 -0.118654324425265D+01 -0.104410829955057D+01 -0.938888601699261D+00 -0.858021574472900D+00 -0.791204751115515D+00 -0.733453757657543D+00 -0.682775324780493D+00 -0.638218828366632D+00 -0.599076467840831D+00 -0.564682711105036D+00 -0.534372176091580D+00 -0.507433138359659D+00 -0.483046252748664D+00 -0.460284786091591D+00 -0.438266901925743D+00 -0.416387302362864D+00 -0.394407280897013D+00 -0.372353845536111D+00 -0.350375940748648D+00 -0.328648962769051D+00 -0.307324701238798D+00 -0.286509881401997D+00 -0.266263188281357D+00 -0.246602432809340D+00 -0.227515109505561D+00 -0.208968319252278D+00 -0.190916438154431D+00 -0.173306355117120D+00 -0.156080733255237D+00 -0.139179908513398D+00 -0.122542983329055D+00 -0.106108551823070D+00 -0.898153742021179D-01 -0.736032218959792D-01 -0.574140365351639D-01 -0.411934706548322D-01 -0.248927928936382D-01 -0.826766487520558D-02 -0.814947217264716D-02 -0.788390807215933D-02 -0.765045360253680D-02 -0.744467680249272D-02 -0.726243857158693D-02 -0.709992979111007D-02 -0.695369235970133D-02 -0.682062788825988D-02 -0.669799677552874D-02 -0.658340970005611D-02 -0.647481278335249D-02 -0.637046784675022D-02 -0.626892851016691D-02 -0.616901317798124D-02 -0.606977581014689D-02 -0.597047557278074D-02 -0.587054611642657D-02 -0.576956568139053D-02 -0.566722874211223D-02 -0.556331999632675D-02 -0.545769116229167D-02 -0.535024111272264D-02 -0.524089939517580D-02 -0.512961322627348D-02 -0.501633777361121D-02 -0.490102954060489D-02 -0.478364237537221D-02 -0.466412578816744D-02 -0.454242516454428D-02 -0.441848324399530D-02 -0.429224275109163D-02 -0.416364955455606D-02 -0.403265608355241D-02 -0.389922487968874D-02 -0.376333185201361D-02 -0.362496923500544D-02 -0.348414808755137D-02 -0.334090022775513D-02 -0.319527963412725D-02 -0.304736325915655D-02 -0.289725128368445D-02 -0.274506681634534D-02 -0.259095519652419D-02 -0.243508270614257D-02 -0.227763505620260D-02 -0.211881542000469D-02 -0.195884224183374D-02 -0.179794679624479D-02 -0.163637059173993D-02 -0.147436259041456D-02 -0.131217641268222D-02 -0.115006741907564D-02 -0.988289817627219D-03 -0.827093874988804D-03 -0.666723034470351D-03 -0.507411374428557D-03 -0.349381009812077D-03 -0.192839863188965D-03 -0.379796027516477D-04 0.100641274514146D-03 0.111226840004974D-03 0.108065914616873D-03 0.105103903536019D-03 0.102329699558368D-03 0.997326694118783D-04 0.973026331507754D-04 0.950298755242329D-04 0.929050948172971D-04 0.909194142195702D-04 0.890643377715605D-04 0.873317851812771D-04 0.857139959009601D-04 0.842036065762386D-04 0.827935572544902D-04 0.814771254908919D-04 0.802478865580269D-04 0.790997333410814D-04 0.780268017308572D-04 0.770235239144767D-04 0.760845878744476D-04 0.752049054142390D-04 0.743796434221622D-04 0.736041712912083D-04 0.728740850775011D-04 0.721851698415321D-04 0.715334174117288D-04 0.709149794886343D-04 0.703261996193305D-04 0.697636004076685D-04 0.692238216970509D-04 0.687036944668762D-04 0.682001825680345D-04 0.677103685120528D-04 0.672315117355993D-04 0.667609512561285D-04 0.662961859632105D-04 0.658347985904584D-04 0.653745232170877D-04 0.649131656871304D-04 0.644486661371957D-04 0.639790513901062D-04 0.635024477446677D-04 0.630170866600110D-04 0.625212791760532D-04 0.620134365192371D-04 0.614920629971038D-04 0.609557282871265D-04 0.604031086481882D-04 0.598329584988733D-04 0.592440933644411D-04 0.586354353515617D-04 0.580059747790074D-04 0.573547630722260D-04 0.566809518431910D-04 0.559837495472948D-04 0.552624399574597D-04 0.545163921117364D-04 0.537450198123679D-04 0.529478420219220D-04 0.521244082563044D-04 0.512743646652325D-04 0.503974227683557D-04 0.494933225070326D-04 0.485619331414000D-04 0.476031331686499D-04 0.466168856405602D-04 0.456032154261265D-04 0.445622092115627D-04 0.434940076843304D-04 0.423988112174811D-04 0.412768869750835D-04 0.401285404905138D-04 0.389541483514222D-04 0.377541383045354D-04 0.365289842818583D-04 0.352791992952461D-04 0.340053908587379D-04 0.327081551176889D-04 0.313881770352964D-04 0.300461621804970D-04 0.286828822027019D-04 0.272991243832621D-04 0.258957378207469D-04 0.244735865351231D-04 0.230335992057462D-04 0.215767080646856D-04 0.201039043190576D-04 0.186161827286924D-04 0.171145963179242D-04 0.156001902951175D-04 0.140740773701964D-04 0.125373333048628D-04 0.109911155732334D-04 0.943655393825793D-05 0.787482790087779D-05 0.630708427706850D-05 0.473454022653641D-05 0.315837240805195D-05 0.157979087589410D-05 0.000000000000000D+00 SHAR_EOF fi # end of overwriting check if test -f 'res3_2' then echo shar: will not over-write existing file "'res3_2'" else cat << "SHAR_EOF" > 'res3_2' DNSPLIN1 Output Domain: T(1) = 0.799D+01, T(N) = 0.200D+02 Number of data points: N = 9 Number of grid points: M = 241 Mesh width: H = 0.500000D-01 # CG steps between restarts: MAXCG = 3 Line search tolerance: FMTOL = 1.000D-06 Convergence tolerance: PHTOL = 1.000D-03 Max number of iterations: NGMAX = 200 Iteration 1 (Steepest descent) Functional: phi(F) = 6.962522789884859D+01 Mean absolute L2-gradient: GNRM1 = 1.23D+01 Max-norm of L2-gradient: GNRMM = 2.79D+03 Line search: No. phi evals NPHV = 32 Optimal step-size S = 9.670D+00 Functional phi(Y) = 9.285783480988394D+00 Relative change in phi(Y) DPHI = 8.54D-01 Squared relative change in Y: DY = 4.56D-03 Cubed S-gradient rel. to Y: DG = 3.40D-07 _________________________________________________________________ Iteration 2 (Conjugate gradient) Functional: phi(F) = 9.285783480988394D+00 Mean absolute L2-gradient: GNRM1 = 4.74D-01 Max-norm of L2-gradient: GNRMM = 6.97D+01 Line search: No. phi evals NPHV = 31 Optimal step-size S = 3.737D+00 Functional phi(Y) = 8.137932191760390D+00 Relative change in phi(Y) DPHI = 1.12D-01 Squared relative change in Y: DY = 2.60D-05 Cubed S-gradient rel. to Y: DG = 1.46D-08 _________________________________________________________________ Iteration 3 (Conjugate gradient) Functional: phi(F) = 8.137932191760390D+00 Mean absolute L2-gradient: GNRM1 = 1.77D+00 Max-norm of L2-gradient: GNRMM = 3.51D+02 Line search: No. phi evals NPHV = 33 Optimal step-size S = 1.499D+01 Functional phi(Y) = 4.539893067805838D+00 Relative change in phi(Y) DPHI = 3.94D-01 Squared relative change in Y: DY = 1.07D-03 Cubed S-gradient rel. to Y: DG = 1.16D-08 _________________________________________________________________ Iteration 4 (Conjugate gradient) Functional: phi(F) = 4.539893067805838D+00 Mean absolute L2-gradient: GNRM1 = 8.26D-01 Max-norm of L2-gradient: GNRMM = 1.47D+02 Line search: No. phi evals NPHV = 35 Optimal step-size S = 1.707D+01 Functional phi(Y) = 3.045988277936966D+00 Relative change in phi(Y) DPHI = 2.70D-01 Squared relative change in Y: DY = 2.07D-04 Cubed S-gradient rel. to Y: DG = 7.61D-10 _________________________________________________________________ Iteration 5 (Steepest descent) Functional: phi(F) = 3.045988277936966D+00 Mean absolute L2-gradient: GNRM1 = 6.68D-01 Max-norm of L2-gradient: GNRMM = 1.33D+02 Line search: No. phi evals NPHV = 34 Optimal step-size S = 1.036D+01 Functional phi(Y) = 2.779376523757108D+00 Relative change in phi(Y) DPHI = 6.59D-02 Squared relative change in Y: DY = 9.05D-05 Cubed S-gradient rel. to Y: DG = 7.76D-10 _________________________________________________________________ Iteration 6 (Conjugate gradient) Functional: phi(F) = 2.779376523757108D+00 Mean absolute L2-gradient: GNRM1 = 7.64D-02 Max-norm of L2-gradient: GNRMM = 4.13D+00 Line search: No. phi evals NPHV = 33 Optimal step-size S = 8.066D+00 Functional phi(Y) = 2.762935338981907D+00 Relative change in phi(Y) DPHI = 4.35D-03 Squared relative change in Y: DY = 1.47D-05 Cubed S-gradient rel. to Y: DG = 2.69D-10 _________________________________________________________________ Iteration 7 (Conjugate gradient) Functional: phi(F) = 2.762935338981907D+00 Mean absolute L2-gradient: GNRM1 = 2.30D-01 Max-norm of L2-gradient: GNRMM = 4.16D+01 Line search: No. phi evals NPHV = 36 Optimal step-size S = 2.264D+01 Functional phi(Y) = 2.666259732184198D+00 Relative change in phi(Y) DPHI = 2.57D-02 Squared relative change in Y: DY = 6.68D-04 Cubed S-gradient rel. to Y: DG = 5.27D-10 _________________________________________________________________ Iteration 8 (Conjugate gradient) Functional: phi(F) = 2.666259732184198D+00 Mean absolute L2-gradient: GNRM1 = 1.49D-01 Max-norm of L2-gradient: GNRMM = 2.25D+01 Line search: No. phi evals NPHV = 35 Optimal step-size S = 1.594D+01 Functional phi(Y) = 2.639868745953409D+00 Relative change in phi(Y) DPHI = 7.20D-03 Squared relative change in Y: DY = 7.77D-05 Cubed S-gradient rel. to Y: DG = 6.09D-11 _________________________________________________________________ Iteration 9 (Steepest descent) Functional: phi(F) = 2.639868745953409D+00 Mean absolute L2-gradient: GNRM1 = 1.09D-01 Max-norm of L2-gradient: GNRMM = 1.50D+01 Line search: No. phi evals NPHV = 37 Optimal step-size S = 2.124D+01 Functional phi(Y) = 2.626303197085885D+00 Relative change in phi(Y) DPHI = 3.73D-03 Squared relative change in Y: DY = 6.13D-05 Cubed S-gradient rel. to Y: DG = 5.01D-11 _________________________________________________________________ Iteration 10 (Conjugate gradient) Functional: phi(F) = 2.626303197085885D+00 Mean absolute L2-gradient: GNRM1 = 9.32D-02 Max-norm of L2-gradient: GNRMM = 1.66D+01 Line search: No. phi evals NPHV = 39 Optimal step-size S = 3.616D+01 Functional phi(Y) = 2.603300113231649D+00 Relative change in phi(Y) DPHI = 6.34D-03 Squared relative change in Y: DY = 2.61D-04 Cubed S-gradient rel. to Y: DG = 2.02D-11 _________________________________________________________________ Iteration 11 (Conjugate gradient) Functional: phi(F) = 2.603300113231649D+00 Mean absolute L2-gradient: GNRM1 = 1.08D-01 Max-norm of L2-gradient: GNRMM = 1.75D+01 Line search: No. phi evals NPHV = 36 Optimal step-size S = 8.393D+00 Functional phi(Y) = 2.596794197414559D+00 Relative change in phi(Y) DPHI = 1.81D-03 Squared relative change in Y: DY = 1.44D-04 Cubed S-gradient rel. to Y: DG = 4.93D-11 _________________________________________________________________ Iteration 12 (Conjugate gradient) Functional: phi(F) = 2.596794197414559D+00 Mean absolute L2-gradient: GNRM1 = 1.45D-01 Max-norm of L2-gradient: GNRMM = 2.17D+01 Line search: No. phi evals NPHV = 35 Optimal step-size S = 1.191D+01 Functional phi(Y) = 2.586424242456628D+00 Relative change in phi(Y) DPHI = 2.88D-03 Squared relative change in Y: DY = 3.55D-06 Cubed S-gradient rel. to Y: DG = 1.95D-11 _________________________________________________________________ Iteration 13 (Steepest descent) Functional: phi(F) = 2.586424242456628D+00 Mean absolute L2-gradient: GNRM1 = 4.88D-02 Max-norm of L2-gradient: GNRMM = 4.51D+00 Line search: No. phi evals NPHV = 38 Optimal step-size S = 3.938D+01 Functional phi(Y) = 2.579400085251667D+00 Relative change in phi(Y) DPHI = 1.96D-03 Squared relative change in Y: DY = 5.51D-05 Cubed S-gradient rel. to Y: DG = 6.70D-12 _________________________________________________________________ Iteration 14 (Conjugate gradient) Functional: phi(F) = 2.579400085251667D+00 Mean absolute L2-gradient: GNRM1 = 7.30D-02 Max-norm of L2-gradient: GNRMM = 1.30D+01 Line search: No. phi evals NPHV = 38 Optimal step-size S = 9.520D+00 Functional phi(Y) = 2.575430230011021D+00 Relative change in phi(Y) DPHI = 1.11D-03 Squared relative change in Y: DY = 1.08D-04 Cubed S-gradient rel. to Y: DG = 1.82D-11 _________________________________________________________________ Iteration 15 (Conjugate gradient) Functional: phi(F) = 2.575430230011021D+00 Mean absolute L2-gradient: GNRM1 = 1.34D-01 Max-norm of L2-gradient: GNRMM = 1.94D+01 Line search: No. phi evals NPHV = 36 Optimal step-size S = 1.442D+01 Functional phi(Y) = 2.564267530101878D+00 Relative change in phi(Y) DPHI = 3.12D-03 Squared relative change in Y: DY = 6.05D-05 Cubed S-gradient rel. to Y: DG = 1.49D-11 _________________________________________________________________ Iteration 16 (Conjugate gradient) Functional: phi(F) = 2.564267530101878D+00 Mean absolute L2-gradient: GNRM1 = 6.52D-02 Max-norm of L2-gradient: GNRMM = 5.73D+00 Line search: No. phi evals NPHV = 40 Optimal step-size S = 4.147D+01 Functional phi(Y) = 2.555298148712444D+00 Relative change in phi(Y) DPHI = 2.52D-03 Squared relative change in Y: DY = 1.59D-04 Cubed S-gradient rel. to Y: DG = 1.43D-12 _________________________________________________________________ Iteration 17 (Steepest descent) Functional: phi(F) = 2.555298148712444D+00 Mean absolute L2-gradient: GNRM1 = 7.87D-02 Max-norm of L2-gradient: GNRMM = 8.89D+00 Line search: No. phi evals NPHV = 36 Optimal step-size S = 1.820D+01 Functional phi(Y) = 2.551693290633654D+00 Relative change in phi(Y) DPHI = 1.01D-03 Squared relative change in Y: DY = 4.82D-06 Cubed S-gradient rel. to Y: DG = 1.76D-12 _________________________________________________________________ Iteration 18 (Conjugate gradient) Functional: phi(F) = 2.551693290633654D+00 Mean absolute L2-gradient: GNRM1 = 4.82D-02 Max-norm of L2-gradient: GNRMM = 7.16D+00 Line search: No. phi evals NPHV = 38 Optimal step-size S = 2.077D+01 Functional phi(Y) = 2.549515142933999D+00 Relative change in phi(Y) DPHI = 6.13D-04 Squared relative change in Y: DY = 2.59D-05 Cubed S-gradient rel. to Y: DG = 2.33D-12 _________________________________________________________________ Number of descent iterations: 18 Total number of phi evaluations in the line searches: 642 Total polygonal curve length: 0.200D+02 SHAR_EOF fi # end of overwriting check if test -f 'res4' then echo shar: will not over-write existing file "'res4'" else cat << "SHAR_EOF" > 'res4' 251 0.100000000000000D+02 0.993750607207363D+01 0.987491644853787D+01 0.981213442846088D+01 0.974906126513033D+01 0.968559505174716D+01 0.962162948730768D+01 0.955705246587638D+01 0.949174441862806D+01 0.942557632205725D+01 0.935840726722549D+01 0.929008145986971D+01 0.922042448029361D+01 0.914923856014783D+01 0.907629650902139D+01 0.900133371507231D+01 0.892403729740553D+01 0.884403091024864D+01 0.876085272197586D+01 0.867392239178242D+01 0.858248973262365D+01 0.848555134533652D+01 0.838170639254049D+01 0.826888112372942D+01 0.814372175817716D+01 0.800000000000000D+01 0.782359006430300D+01 0.760086877059379D+01 0.732016504228752D+01 0.698180507443569D+01 0.660802577138204D+01 0.624006628604651D+01 0.591787925657041D+01 0.566027024548146D+01 0.546335457297048D+01 0.531201632073672D+01 0.519073251825068D+01 0.508869042398251D+01 0.500000000000000D+01 0.492153809431368D+01 0.485072666495007D+01 0.478595499214524D+01 0.472614186924041D+01 0.467050833946931D+01 0.461846939721651D+01 0.456957320001937D+01 0.452346169580769D+01 0.447984472023862D+01 0.443848306852141D+01 0.439917688538704D+01 0.436175709239622D+01 0.432607888313502D+01 0.429201691367960D+01 0.425946179252032D+01 0.422831738401494D+01 0.419849862296550D+01 0.416992975553498D+01 0.414254295777675D+01 0.411627723555683D+01 0.409107749788065D+01 0.406689373589628D+01 0.404368029550340D+01 0.402139526531514D+01 0.400000000000000D+01 0.397945879256493D+01 0.395971900149833D+01 0.394073169712187D+01 0.392245112046268D+01 0.390483423268439D+01 0.388784032849499D+01 0.387143070953473D+01 0.385556841155172D+01 0.384021797756018D+01 0.382534526876012D+01 0.381091730571409D+01 0.379690213370540D+01 0.378326870784442D+01 0.376998679494300D+01 0.375702689021316D+01 0.374436014740558D+01 0.373195832115123D+01 0.371979372013813D+01 0.370783916949322D+01 0.369606798047441D+01 0.368445392540208D+01 0.367297121572052D+01 0.366159448119118D+01 0.365029874846565D+01 0.363905941763578D+01 0.362785223577105D+01 0.361665326688833D+01 0.360543885821675D+01 0.359418560298532D+01 0.358287030024177D+01 0.357146991238221D+01 0.355996152111128D+01 0.354832228244835D+01 0.353652938114174D+01 0.352455998445801D+01 0.351239119479827D+01 0.350000000000000D+01 0.348736322783777D+01 0.347471193466032D+01 0.346227614549308D+01 0.345028260001681D+01 0.343895311478565D+01 0.342850447060048D+01 0.341915148248377D+01 0.341111602219962D+01 0.340464385195015D+01 0.340002128542083D+01 0.339756133530943D+01 0.339752365676023D+01 0.340000000000000D+01 0.340490122417810D+01 0.341207471116868D+01 0.342148891790646D+01 0.343318025201901D+01 0.344722587645074D+01 0.346374384891503D+01 0.348289043395589D+01 0.350486151097500D+01 0.352990152628670D+01 0.355832362256498D+01 0.359055202591319D+01 0.362711711718992D+01 0.366860294289474D+01 0.371585355046230D+01 0.377039971103890D+01 0.383432930817346D+01 0.391023862809254D+01 0.400565545892102D+01 0.414099174605923D+01 0.434661026481038D+01 0.464484658788945D+01 0.501922569834422D+01 0.540680396880582D+01 0.574216496099520D+01 0.600000000000000D+01 0.619050625658925D+01 0.633970620499675D+01 0.646252223583552D+01 0.656740770525289D+01 0.665923941164405D+01 0.674099953575858D+01 0.681466445575152D+01 0.688163706656104D+01 0.694295525356590D+01 0.699940496171145D+01 0.705159330241093D+01 0.710000000000000D+01 0.714501286502116D+01 0.718708369439071D+01 0.722656788934798D+01 0.726375121604854D+01 0.729886781520296D+01 0.733211268618555D+01 0.736365053039441D+01 0.739362216276457D+01 0.742214927588943D+01 0.744933805868490D+01 0.747528199247333D+01 0.750006404022060D+01 0.752375838076648D+01 0.754643179887232D+01 0.756814481266486D+01 0.758895259796092D+01 0.760890575247143D+01 0.762805093126689D+01 0.764643137726249D+01 0.766408736574618D+01 0.768105657901664D+01 0.769737442512178D+01 0.771307431289389D+01 0.772818789365448D+01 0.774274527801757D+01 0.775677523419670D+01 0.777030537223015D+01 0.778336231670972D+01 0.779597186904703D+01 0.780815915912078D+01 0.781994878535678D+01 0.783136494189596D+01 0.784243153145995D+01 0.785317226275699D+01 0.786361073169713D+01 0.787377048621492D+01 0.788367507504939D+01 0.789334808134149D+01 0.790281314233104D+01 0.791209395674632D+01 0.792121428167086D+01 0.793019792075254D+01 0.793906870560798D+01 0.794785047219292D+01 0.795656703378383D+01 0.796524215207021D+01 0.797389950771265D+01 0.798256267159374D+01 0.799125507788728D+01 0.800000000000000D+01 0.800882036027823D+01 0.801771449534278D+01 0.802668060271936D+01 0.803571690926917D+01 0.804482166907630D+01 0.805399316149094D+01 0.806322968931703D+01 0.807252957713366D+01 0.808189116974022D+01 0.809131283071628D+01 0.810079294108753D+01 0.811032989808983D+01 0.811992211402398D+01 0.812956801519437D+01 0.813926604092503D+01 0.814901464264721D+01 0.815881228305296D+01 0.816865743530959D+01 0.817854858233024D+01 0.818848421609628D+01 0.819846283702737D+01 0.820848295339554D+01 0.821854308077967D+01 0.822864174155739D+01 0.823877746443123D+01 0.824894878398642D+01 0.825915424027785D+01 0.826939237844370D+01 0.827966174834382D+01 0.828996090422071D+01 0.830028840438135D+01 0.831064281089817D+01 0.832102268932756D+01 0.833142660844451D+01 0.834185313999209D+01 0.835230085844426D+01 0.836276834078127D+01 0.837325416627606D+01 0.838375691629105D+01 0.839427517408415D+01 0.840480752462306D+01 0.841535255440721D+01 0.842590885129621D+01 0.843647500434442D+01 0.844704960364052D+01 0.845763124015164D+01 0.846821850557129D+01 0.847880999217035D+01 0.848940429265059D+01 0.850000000000000D+01 -0.156234819815930D+01 -0.156354439327666D+01 -0.156714554515938D+01 -0.157318979259422D+01 -0.158174220892142D+01 -0.159289722278315D+01 -0.160678232338480D+01 -0.162356335849523D+01 -0.164345179773913D+01 -0.166671439253208D+01 -0.169368577734421D+01 -0.172478483664851D+01 -0.176053624652355D+01 -0.180159964090274D+01 -0.184881056344399D+01 -0.190324014519825D+01 -0.196628506029586D+01 -0.203980719287089D+01 -0.212635648082782D+01 -0.222953736690268D+01 -0.235463808057370D+01 -0.250979175103945D+01 -0.270837777008874D+01 -0.297480792954163D+01 -0.336101404661775D+01 -0.400164617342705D+01 -0.498914036757764D+01 -0.629281277519340D+01 -0.773829620197625D+01 -0.890174088631854D+01 -0.927173485486476D+01 -0.862683143514533D+01 -0.724745050706311D+01 -0.568155854499919D+01 -0.435317405930926D+01 -0.340777568399744D+01 -0.279157370942763D+01 -0.238415647813356D+01 -0.208940412086034D+01 -0.186591668812417D+01 -0.169478877710550D+01 -0.155730994637074D+01 -0.144308315844913D+01 -0.134590590029865D+01 -0.126168924312425D+01 -0.118759626761036D+01 -0.112160599725937D+01 -0.106223284107845D+01 -0.100834793564473D+01 -0.959074701564910D+00 -0.913725028150336D+00 -0.871752233957745D+00 -0.832713632683668D+00 -0.796244120808209D+00 -0.762039619435306D+00 -0.729845355999492D+00 -0.699445814859379D+00 -0.670656499726852D+00 -0.643318248701175D+00 -0.617293745756908D+00 -0.592465029715727D+00 -0.568730882264223D+00 -0.546003693792441D+00 -0.524205909377695D+00 -0.503512481270868D+00 -0.484088693038276D+00 -0.465848512945599D+00 -0.448718305468421D+00 -0.432634899596135D+00 -0.417544039370743D+00 -0.403398961790841D+00 -0.390159149681918D+00 -0.377789284895086D+00 -0.366258398076152D+00 -0.355539188184012D+00 -0.345607473370824D+00 -0.336441734529952D+00 -0.328022720390797D+00 -0.320333094217751D+00 -0.313357113274115D+00 -0.307080340843147D+00 -0.301489395725141D+00 -0.296571745796537D+00 -0.292315551139261D+00 -0.288709559423589D+00 -0.285743052636211D+00 -0.283405840685869D+00 -0.281688294442473D+00 -0.280581408682490D+00 -0.280076884343194D+00 -0.280167219428790D+00 -0.280845798787605D+00 -0.282106974687235D+00 -0.283946132538865D+00 -0.286359739131054D+00 -0.289345374173250D+00 -0.292901749619290D+00 -0.297028724879200D+00 -0.301727329293344D+00 -0.306999805725150D+00 -0.312849587006336D+00 -0.316100816745979D+00 -0.313588529308600D+00 -0.305366683043895D+00 -0.291537883842846D+00 -0.272226617704180D+00 -0.247520403773543D+00 -0.217355605010650D+00 -0.181345381670273D+00 -0.138684209734907D+00 -0.885314580088947D-01 -0.312203582574999D-01 0.304833086320788D-01 0.922195927233693D-01 0.150933889608518D+00 0.207346171604517D+00 0.263819260629128D+00 0.321711981803430D+00 0.382044961200184D+00 0.445806968814449D+00 0.513970775749684D+00 0.587638654135153D+00 0.668276394874689D+00 0.758131245331051D+00 0.859918682811822D+00 0.975636462269358D+00 0.110920541590474D+01 0.127245960180198D+01 0.148094697138947D+01 0.174798646317051D+01 0.214157688434449D+01 0.288441397458364D+01 0.426193507361705D+01 0.629818552287782D+01 0.840769291917296D+01 0.952446726145461D+01 0.903674078313728D+01 0.741495038992722D+01 0.560426619492564D+01 0.424632756245941D+01 0.340019974057834D+01 0.284626875320166D+01 0.245896469760661D+01 0.216989788132113D+01 0.194281305134338D+01 0.175796913503076D+01 0.160363497267973D+01 0.147209868938021D+01 0.135797561056293D+01 0.125743797860683D+01 0.116774453262782D+01 0.108854617988383D+01 0.101943780408527D+01 0.958344020722979D+00 0.903749073187232D+00 0.854518376712599D+00 0.809783939893183D+00 0.768868457237681D+00 0.731234318687657D+00 0.696448699004104D+00 0.664158957298844D+00 0.634074769196302D+00 0.605954853664381D+00 0.579596983146524D+00 0.554830398729689D+00 0.531509988607437D+00 0.509511747582148D+00 0.488729166324631D+00 0.469070309888209D+00 0.450455430991159D+00 0.432815021926891D+00 0.416088242195001D+00 0.400221673465639D+00 0.385168356658805D+00 0.370887064046066D+00 0.357341756777652D+00 0.344501177657186D+00 0.332338531412768D+00 0.320831210210970D+00 0.309960530138342D+00 0.299711453871898D+00 0.290072284689735D+00 0.281034326289697D+00 0.272591510762787D+00 0.264740002964736D+00 0.257477793224126D+00 0.250804291903206D+00 0.244719939082194D+00 0.239225841020596D+00 0.234323442560380D+00 0.230014241747778D+00 0.226299550077702D+00 0.223180299213943D+00 0.220656893004723D+00 0.218729102198190D+00 0.217395998466197D+00 0.216655924110243D+00 0.216506494044133D+00 0.216944627182880D+00 0.217966605078213D+00 0.219566029886897D+00 0.221431191784793D+00 0.223253030514159D+00 0.225030174079865D+00 0.226763329461632D+00 0.228453152772046D+00 0.230100253009224D+00 0.231705195534082D+00 0.233268505289885D+00 0.234790669782736D+00 0.236272141841365D+00 0.237713342169377D+00 0.239114661705631D+00 0.240476463806738D+00 0.241799086263028D+00 0.243082843160525D+00 0.244328026599216D+00 0.245534908279699D+00 0.246703740965915D+00 0.247834759833609D+00 0.248928183714181D+00 0.249984216240784D+00 0.251003046903708D+00 0.251984852023113D+00 0.252929795644552D+00 0.253838030362941D+00 0.254709698082745D+00 0.255544930715979D+00 0.256343850824603D+00 0.257106572212606D+00 0.257833200469171D+00 0.258523833468272D+00 0.259178561827600D+00 0.259797469329226D+00 0.260380633306578D+00 0.260928124996851D+00 0.261440009864788D+00 0.261916347897517D+00 0.262357193872265D+00 0.262762597601074D+00 0.263132604150118D+00 0.263467254038274D+00 0.263766583414315D+00 0.264030624215161D+00 0.264259404303879D+00 0.264452947590277D+00 0.264611274134641D+00 0.264734400233779D+00 0.264822338491211D+00 0.264875097870676D+00 0.264892683735374D+00 0.000000000000000D+00 -0.598097558679456D-01 -0.120247838267806D+00 -0.181964533474410D+00 -0.245656282885642D+00 -0.312094410200858D+00 -0.382160619881722D+00 -0.456891135639514D+00 -0.537530826555388D+00 -0.625598913092107D+00 -0.722970327514671D+00 -0.831982637700124D+00 -0.955587856051876D+00 -0.109758186290776D+01 -0.126296426415484D+01 -0.145851482355797D+01 -0.169373093132252D+01 -0.198237569742910D+01 -0.234508870041727D+01 -0.281395560332576D+01 -0.344108008022537D+01 -0.431660344306195D+01 -0.561269750940285D+01 -0.770881046324168D+01 -0.116014953905641D+02 -0.204301109499005D+02 -0.289445987576276D+02 -0.362390216231601D+02 -0.360351497159822D+02 -0.221370845011326D+02 0.363738607382202D+01 0.286077849121491D+02 0.403612614919618D+02 0.379333366112344D+02 0.284858876732619D+02 0.187840310923293D+02 0.120260676361611D+02 0.834479392854248D+01 0.639282393511853D+01 0.478154770168993D+01 0.377484784924331D+01 0.309909368749473D+01 0.261224570858587D+01 0.224661719893826D+01 0.196421565978155D+01 0.174043311591321D+01 0.155908040163633D+01 0.140957740740966D+01 0.128466786427639D+01 0.117899383971443D+01 0.108848983101428D+01 0.101014987861525D+01 0.941780185088614D+00 0.881695408684324D+00 0.828529659960831D+00 0.781183511829875D+00 0.738793545175809D+00 0.700672211450537D+00 0.666240339833313D+00 0.634984807380001D+00 0.606450994679042D+00 0.580256377896160D+00 0.556103045692979D+00 0.533786175044293D+00 0.500885230297066D+00 0.470304181332537D+00 0.441704823301303D+00 0.414805550557618D+00 0.389364743056675D+00 0.365178268212918D+00 0.342075610782200D+00 0.319914994663939D+00 0.298578244677661D+00 0.277966096269011D+00 0.257994398338013D+00 0.238591342321404D+00 0.219695599722181D+00 0.201255107235565D+00 0.183226201416753D+00 0.165572845765016D+00 0.148265775783418D+00 0.131281480116874D+00 0.114601016313332D+00 0.982087165504741D-01 0.820908692331090D-01 0.662344701357620D-01 0.506261273813813D-01 0.352511847884207D-01 0.200931032107166D-01 0.513311375405223D-02 -0.964986803381196D-02 -0.242790999069320D-01 -0.387796950745978D-01 -0.531781975068868D-01 -0.675021321025482D-01 -0.817796200072718D-01 -0.960391522947246D-01 -0.110309610700798D+00 -0.124620610006398D+00 -0.139003211583888D+00 -0.153485852475432D+00 -0.907563450669446D-02 0.134690006375615D+00 0.276402306859658D+00 0.415037653192785D+00 0.550525653740530D+00 0.684785042791292D+00 0.823454895353404D+00 0.977056271665444D+00 0.115600232510282D+01 0.135163526119780D+01 0.151391972637194D+01 0.157126361810700D+01 0.151555058645753D+01 0.142016425779989D+01 0.140044984200005D+01 0.142320460923051D+01 0.147143144948458D+01 0.154521752035314D+01 0.164288286036013D+01 0.176530748640158D+01 0.191808643287189D+01 0.211380060410493D+01 0.237894191871313D+01 0.271042995532544D+01 0.307545901755135D+01 0.360298866421777D+01 0.455972063064414D+01 0.586464784873036D+01 0.748732674032193D+01 0.121921943183767D+02 0.249496601935811D+02 0.439263947580892D+02 0.578861277049492D+02 0.475892421098079D+02 0.824947500427442D+01 -0.326357989201409D+02 -0.484537207403618D+02 -0.420804890097171D+02 -0.258164426135948D+02 -0.164899484804587D+02 -0.112066008883749D+02 -0.815860189137763D+01 -0.629473892289678D+01 -0.505950257599030D+01 -0.418269323964104D+01 -0.353401487791005D+01 -0.304279928706630D+01 -0.266335465379741D+01 -0.236352694400754D+01 -0.212114535494301D+01 -0.183877228225660D+01 -0.161664650767168D+01 -0.143804266044267D+01 -0.129170471634465D+01 -0.116983010738703D+01 -0.106689173358376D+01 -0.978882399191305D+00 -0.902824528309920D+00 -0.836456455867718D+00 -0.778030629395299D+00 -0.726178775731778D+00 -0.679817000864280D+00 -0.638076525028564D+00 -0.600252695813208D+00 -0.565767810299378D+00 -0.534144240965095D+00 -0.504984821910748D+00 -0.477957999910350D+00 -0.452785944942136D+00 -0.429234508271259D+00 -0.407104478323261D+00 -0.386223958144805D+00 -0.366441882196922D+00 -0.347622748440024D+00 -0.329642614980696D+00 -0.312386341042581D+00 -0.295745971178318D+00 -0.279620088911581D+00 -0.263913914719804D+00 -0.248539898602407D+00 -0.233418560505738D+00 -0.218479359496149D+00 -0.203661416849354D+00 -0.188913973053206D+00 -0.174196513977320D+00 -0.159478552068659D+00 -0.144739088981938D+00 -0.129965814097965D+00 -0.115154108912829D+00 -0.100305931717282D+00 -0.854286517865122D-01 -0.705338914014364D-01 -0.556364190595904D-01 -0.407531212670564D-01 -0.259020653325948D-01 -0.111016524650953D-01 0.363014915960580D-02 0.182765077777480D-01 0.328223869888733D-01 0.471488534453668D-01 0.461092414494324D-01 0.449826950188470D-01 0.438744832664817D-01 0.427832858218569D-01 0.417078796988157D-01 0.406471321601209D-01 0.395999940827618D-01 0.385654937073987D-01 0.375427309351473D-01 0.365308719962876D-01 0.355291444043004D-01 0.345368324083939D-01 0.335532726469800D-01 0.325778501675256D-01 0.316099947073045D-01 0.306491772272821D-01 0.296949067968288D-01 0.287467275139619D-01 0.278042158707859D-01 0.268669781577913D-01 0.259346481723544D-01 0.250068849738661D-01 0.240833709963528D-01 0.231638100756104D-01 0.222479258438213D-01 0.213354601463767D-01 0.204261715153198D-01 0.195198339159042D-01 0.186162354842700D-01 0.177151773439466D-01 0.168164726110920D-01 0.159199453553249D-01 0.150254297259789D-01 0.141327691416393D-01 0.132418153719893D-01 0.123524280248866D-01 0.114644736115554D-01 0.105778251258126D-01 0.969236131465046D-02 0.880796613755841D-02 0.792452827025336D-02 0.704194053180451D-02 0.616009951048824D-02 0.527890492540983D-02 0.439825939446692D-02 0.351806782372677D-02 0.263823713320122D-02 0.175867573837252D-02 0.879293234890000D-03 0.000000000000000D+00 SHAR_EOF fi # end of overwriting check if test -f 'res4_1' then echo shar: will not over-write existing file "'res4_1'" else cat << "SHAR_EOF" > 'res4_1' 251 0.100000000000000D+02 0.993750607207363D+01 0.987491644853787D+01 0.981213442846088D+01 0.974906126513033D+01 0.968559505174716D+01 0.962162948730768D+01 0.955705246587638D+01 0.949174441862806D+01 0.942557632205725D+01 0.935840726722549D+01 0.929008145986971D+01 0.922042448029361D+01 0.914923856014783D+01 0.907629650902139D+01 0.900133371507231D+01 0.892403729740553D+01 0.884403091024864D+01 0.876085272197586D+01 0.867392239178242D+01 0.858248973262365D+01 0.848555134533652D+01 0.838170639254049D+01 0.826888112372942D+01 0.814372175817716D+01 0.800000000000000D+01 0.782359006430300D+01 0.760086877059379D+01 0.732016504228752D+01 0.698180507443569D+01 0.660802577138204D+01 0.624006628604651D+01 0.591787925657041D+01 0.566027024548146D+01 0.546335457297048D+01 0.531201632073672D+01 0.519073251825068D+01 0.508869042398251D+01 0.500000000000000D+01 0.492153809431368D+01 0.485072666495007D+01 0.478595499214524D+01 0.472614186924041D+01 0.467050833946931D+01 0.461846939721651D+01 0.456957320001937D+01 0.452346169580769D+01 0.447984472023862D+01 0.443848306852141D+01 0.439917688538704D+01 0.436175709239622D+01 0.432607888313502D+01 0.429201691367960D+01 0.425946179252032D+01 0.422831738401494D+01 0.419849862296550D+01 0.416992975553498D+01 0.414254295777675D+01 0.411627723555683D+01 0.409107749788065D+01 0.406689373589628D+01 0.404368029550340D+01 0.402139526531514D+01 0.400000000000000D+01 0.397945879256493D+01 0.395971900149833D+01 0.394073169712187D+01 0.392245112046268D+01 0.390483423268439D+01 0.388784032849499D+01 0.387143070953473D+01 0.385556841155172D+01 0.384021797756018D+01 0.382534526876012D+01 0.381091730571409D+01 0.379690213370540D+01 0.378326870784442D+01 0.376998679494300D+01 0.375702689021316D+01 0.374436014740558D+01 0.373195832115123D+01 0.371979372013813D+01 0.370783916949322D+01 0.369606798047441D+01 0.368445392540208D+01 0.367297121572052D+01 0.366159448119118D+01 0.365029874846565D+01 0.363905941763578D+01 0.362785223577105D+01 0.361665326688833D+01 0.360543885821675D+01 0.359418560298532D+01 0.358287030024177D+01 0.357146991238221D+01 0.355996152111128D+01 0.354832228244835D+01 0.353652938114174D+01 0.352455998445801D+01 0.351239119479827D+01 0.350000000000000D+01 0.348736322783777D+01 0.347471193466032D+01 0.346227614549308D+01 0.345028260001681D+01 0.343895311478565D+01 0.342850447060048D+01 0.341915148248377D+01 0.341111602219962D+01 0.340464385195015D+01 0.340002128542083D+01 0.339756133530943D+01 0.339752365676023D+01 0.340000000000000D+01 0.340490122417810D+01 0.341207471116868D+01 0.342148891790646D+01 0.343318025201901D+01 0.344722587645074D+01 0.346374384891503D+01 0.348289043395589D+01 0.350486151097500D+01 0.352990152628670D+01 0.355832362256498D+01 0.359055202591319D+01 0.362711711718992D+01 0.366860294289474D+01 0.371585355046230D+01 0.377039971103890D+01 0.383432930817346D+01 0.391023862809254D+01 0.400565545892102D+01 0.414099174605923D+01 0.434661026481038D+01 0.464484658788945D+01 0.501922569834422D+01 0.540680396880582D+01 0.574216496099520D+01 0.600000000000000D+01 0.619050625658925D+01 0.633970620499675D+01 0.646252223583552D+01 0.656740770525289D+01 0.665923941164405D+01 0.674099953575858D+01 0.681466445575152D+01 0.688163706656104D+01 0.694295525356590D+01 0.699940496171145D+01 0.705159330241093D+01 0.710000000000000D+01 0.714501286502116D+01 0.718708369439071D+01 0.722656788934798D+01 0.726375121604854D+01 0.729886781520296D+01 0.733211268618555D+01 0.736365053039441D+01 0.739362216276457D+01 0.742214927588943D+01 0.744933805868490D+01 0.747528199247333D+01 0.750006404022060D+01 0.752375838076648D+01 0.754643179887232D+01 0.756814481266486D+01 0.758895259796092D+01 0.760890575247143D+01 0.762805093126689D+01 0.764643137726249D+01 0.766408736574618D+01 0.768105657901664D+01 0.769737442512178D+01 0.771307431289389D+01 0.772818789365448D+01 0.774274527801757D+01 0.775677523419670D+01 0.777030537223015D+01 0.778336231670972D+01 0.779597186904703D+01 0.780815915912078D+01 0.781994878535678D+01 0.783136494189596D+01 0.784243153145995D+01 0.785317226275699D+01 0.786361073169713D+01 0.787377048621492D+01 0.788367507504939D+01 0.789334808134149D+01 0.790281314233104D+01 0.791209395674632D+01 0.792121428167086D+01 0.793019792075254D+01 0.793906870560798D+01 0.794785047219292D+01 0.795656703378383D+01 0.796524215207021D+01 0.797389950771265D+01 0.798256267159374D+01 0.799125507788728D+01 0.800000000000000D+01 0.800882036027823D+01 0.801771449534278D+01 0.802668060271936D+01 0.803571690926917D+01 0.804482166907630D+01 0.805399316149094D+01 0.806322968931703D+01 0.807252957713366D+01 0.808189116974022D+01 0.809131283071628D+01 0.810079294108753D+01 0.811032989808983D+01 0.811992211402398D+01 0.812956801519437D+01 0.813926604092503D+01 0.814901464264721D+01 0.815881228305296D+01 0.816865743530959D+01 0.817854858233024D+01 0.818848421609628D+01 0.819846283702737D+01 0.820848295339554D+01 0.821854308077967D+01 0.822864174155739D+01 0.823877746443123D+01 0.824894878398642D+01 0.825915424027785D+01 0.826939237844370D+01 0.827966174834382D+01 0.828996090422071D+01 0.830028840438135D+01 0.831064281089817D+01 0.832102268932756D+01 0.833142660844451D+01 0.834185313999209D+01 0.835230085844426D+01 0.836276834078127D+01 0.837325416627606D+01 0.838375691629105D+01 0.839427517408415D+01 0.840480752462306D+01 0.841535255440721D+01 0.842590885129621D+01 0.843647500434442D+01 0.844704960364052D+01 0.845763124015164D+01 0.846821850557129D+01 0.847880999217035D+01 0.848940429265059D+01 0.850000000000000D+01 -0.156234819815930D+01 -0.156354439327666D+01 -0.156714554515938D+01 -0.157318979259422D+01 -0.158174220892142D+01 -0.159289722278315D+01 -0.160678232338480D+01 -0.162356335849523D+01 -0.164345179773913D+01 -0.166671439253208D+01 -0.169368577734421D+01 -0.172478483664851D+01 -0.176053624652355D+01 -0.180159964090274D+01 -0.184881056344399D+01 -0.190324014519825D+01 -0.196628506029586D+01 -0.203980719287089D+01 -0.212635648082782D+01 -0.222953736690268D+01 -0.235463808057370D+01 -0.250979175103945D+01 -0.270837777008874D+01 -0.297480792954163D+01 -0.336101404661775D+01 -0.400164617342705D+01 -0.498914036757764D+01 -0.629281277519340D+01 -0.773829620197625D+01 -0.890174088631854D+01 -0.927173485486476D+01 -0.862683143514533D+01 -0.724745050706311D+01 -0.568155854499919D+01 -0.435317405930926D+01 -0.340777568399744D+01 -0.279157370942763D+01 -0.238415647813356D+01 -0.208940412086034D+01 -0.186591668812417D+01 -0.169478877710550D+01 -0.155730994637074D+01 -0.144308315844913D+01 -0.134590590029865D+01 -0.126168924312425D+01 -0.118759626761036D+01 -0.112160599725937D+01 -0.106223284107845D+01 -0.100834793564473D+01 -0.959074701564910D+00 -0.913725028150336D+00 -0.871752233957745D+00 -0.832713632683668D+00 -0.796244120808209D+00 -0.762039619435306D+00 -0.729845355999492D+00 -0.699445814859379D+00 -0.670656499726852D+00 -0.643318248701175D+00 -0.617293745756908D+00 -0.592465029715727D+00 -0.568730882264223D+00 -0.546003693792441D+00 -0.524205909377695D+00 -0.503512481270868D+00 -0.484088693038276D+00 -0.465848512945599D+00 -0.448718305468421D+00 -0.432634899596135D+00 -0.417544039370743D+00 -0.403398961790841D+00 -0.390159149681918D+00 -0.377789284895086D+00 -0.366258398076152D+00 -0.355539188184012D+00 -0.345607473370824D+00 -0.336441734529952D+00 -0.328022720390797D+00 -0.320333094217751D+00 -0.313357113274115D+00 -0.307080340843147D+00 -0.301489395725141D+00 -0.296571745796537D+00 -0.292315551139261D+00 -0.288709559423589D+00 -0.285743052636211D+00 -0.283405840685869D+00 -0.281688294442473D+00 -0.280581408682490D+00 -0.280076884343194D+00 -0.280167219428790D+00 -0.280845798787605D+00 -0.282106974687235D+00 -0.283946132538865D+00 -0.286359739131054D+00 -0.289345374173250D+00 -0.292901749619290D+00 -0.297028724879200D+00 -0.301727329293344D+00 -0.306999805725150D+00 -0.312849587006336D+00 -0.316100816745979D+00 -0.313588529308600D+00 -0.305366683043895D+00 -0.291537883842846D+00 -0.272226617704180D+00 -0.247520403773543D+00 -0.217355605010650D+00 -0.181345381670273D+00 -0.138684209734907D+00 -0.885314580088947D-01 -0.312203582574999D-01 0.304833086320788D-01 0.922195927233693D-01 0.150933889608518D+00 0.207346171604517D+00 0.263819260629128D+00 0.321711981803430D+00 0.382044961200184D+00 0.445806968814449D+00 0.513970775749684D+00 0.587638654135153D+00 0.668276394874689D+00 0.758131245331051D+00 0.859918682811822D+00 0.975636462269358D+00 0.110920541590474D+01 0.127245960180198D+01 0.148094697138947D+01 0.174798646317051D+01 0.214157688434449D+01 0.288441397458364D+01 0.426193507361705D+01 0.629818552287782D+01 0.840769291917296D+01 0.952446726145461D+01 0.903674078313728D+01 0.741495038992722D+01 0.560426619492564D+01 0.424632756245941D+01 0.340019974057834D+01 0.284626875320166D+01 0.245896469760661D+01 0.216989788132113D+01 0.194281305134338D+01 0.175796913503076D+01 0.160363497267973D+01 0.147209868938021D+01 0.135797561056293D+01 0.125743797860683D+01 0.116774453262782D+01 0.108854617988383D+01 0.101943780408527D+01 0.958344020722979D+00 0.903749073187232D+00 0.854518376712599D+00 0.809783939893183D+00 0.768868457237681D+00 0.731234318687657D+00 0.696448699004104D+00 0.664158957298844D+00 0.634074769196302D+00 0.605954853664381D+00 0.579596983146524D+00 0.554830398729689D+00 0.531509988607437D+00 0.509511747582148D+00 0.488729166324631D+00 0.469070309888209D+00 0.450455430991159D+00 0.432815021926891D+00 0.416088242195001D+00 0.400221673465639D+00 0.385168356658805D+00 0.370887064046066D+00 0.357341756777652D+00 0.344501177657186D+00 0.332338531412768D+00 0.320831210210970D+00 0.309960530138342D+00 0.299711453871898D+00 0.290072284689735D+00 0.281034326289697D+00 0.272591510762787D+00 0.264740002964736D+00 0.257477793224126D+00 0.250804291903206D+00 0.244719939082194D+00 0.239225841020596D+00 0.234323442560380D+00 0.230014241747778D+00 0.226299550077702D+00 0.223180299213943D+00 0.220656893004723D+00 0.218729102198190D+00 0.217395998466197D+00 0.216655924110243D+00 0.216506494044133D+00 0.216944627182880D+00 0.217966605078213D+00 0.219566029886897D+00 0.221431191784793D+00 0.223253030514159D+00 0.225030174079865D+00 0.226763329461632D+00 0.228453152772046D+00 0.230100253009224D+00 0.231705195534082D+00 0.233268505289885D+00 0.234790669782736D+00 0.236272141841365D+00 0.237713342169377D+00 0.239114661705631D+00 0.240476463806738D+00 0.241799086263028D+00 0.243082843160525D+00 0.244328026599216D+00 0.245534908279699D+00 0.246703740965915D+00 0.247834759833609D+00 0.248928183714181D+00 0.249984216240784D+00 0.251003046903708D+00 0.251984852023113D+00 0.252929795644552D+00 0.253838030362941D+00 0.254709698082745D+00 0.255544930715979D+00 0.256343850824603D+00 0.257106572212606D+00 0.257833200469171D+00 0.258523833468272D+00 0.259178561827600D+00 0.259797469329226D+00 0.260380633306578D+00 0.260928124996851D+00 0.261440009864788D+00 0.261916347897517D+00 0.262357193872265D+00 0.262762597601074D+00 0.263132604150118D+00 0.263467254038274D+00 0.263766583414315D+00 0.264030624215161D+00 0.264259404303879D+00 0.264452947590277D+00 0.264611274134641D+00 0.264734400233779D+00 0.264822338491211D+00 0.264875097870676D+00 0.264892683735374D+00 0.000000000000000D+00 -0.598097558679456D-01 -0.120247838267806D+00 -0.181964533474410D+00 -0.245656282885642D+00 -0.312094410200858D+00 -0.382160619881722D+00 -0.456891135639514D+00 -0.537530826555388D+00 -0.625598913092107D+00 -0.722970327514671D+00 -0.831982637700124D+00 -0.955587856051876D+00 -0.109758186290776D+01 -0.126296426415484D+01 -0.145851482355797D+01 -0.169373093132252D+01 -0.198237569742910D+01 -0.234508870041727D+01 -0.281395560332576D+01 -0.344108008022537D+01 -0.431660344306195D+01 -0.561269750940285D+01 -0.770881046324168D+01 -0.116014953905641D+02 -0.204301109499005D+02 -0.289445987576276D+02 -0.362390216231601D+02 -0.360351497159822D+02 -0.221370845011326D+02 0.363738607382202D+01 0.286077849121491D+02 0.403612614919618D+02 0.379333366112344D+02 0.284858876732619D+02 0.187840310923293D+02 0.120260676361611D+02 0.834479392854248D+01 0.639282393511853D+01 0.478154770168993D+01 0.377484784924331D+01 0.309909368749473D+01 0.261224570858587D+01 0.224661719893826D+01 0.196421565978155D+01 0.174043311591321D+01 0.155908040163633D+01 0.140957740740966D+01 0.128466786427639D+01 0.117899383971443D+01 0.108848983101428D+01 0.101014987861525D+01 0.941780185088614D+00 0.881695408684324D+00 0.828529659960831D+00 0.781183511829875D+00 0.738793545175809D+00 0.700672211450537D+00 0.666240339833313D+00 0.634984807380001D+00 0.606450994679042D+00 0.580256377896160D+00 0.556103045692979D+00 0.533786175044293D+00 0.500885230297066D+00 0.470304181332537D+00 0.441704823301303D+00 0.414805550557618D+00 0.389364743056675D+00 0.365178268212918D+00 0.342075610782200D+00 0.319914994663939D+00 0.298578244677661D+00 0.277966096269011D+00 0.257994398338013D+00 0.238591342321404D+00 0.219695599722181D+00 0.201255107235565D+00 0.183226201416753D+00 0.165572845765016D+00 0.148265775783418D+00 0.131281480116874D+00 0.114601016313332D+00 0.982087165504741D-01 0.820908692331090D-01 0.662344701357620D-01 0.506261273813813D-01 0.352511847884207D-01 0.200931032107166D-01 0.513311375405223D-02 -0.964986803381196D-02 -0.242790999069320D-01 -0.387796950745978D-01 -0.531781975068868D-01 -0.675021321025482D-01 -0.817796200072718D-01 -0.960391522947246D-01 -0.110309610700798D+00 -0.124620610006398D+00 -0.139003211583888D+00 -0.153485852475432D+00 -0.907563450669446D-02 0.134690006375615D+00 0.276402306859658D+00 0.415037653192785D+00 0.550525653740530D+00 0.684785042791292D+00 0.823454895353404D+00 0.977056271665444D+00 0.115600232510282D+01 0.135163526119780D+01 0.151391972637194D+01 0.157126361810700D+01 0.151555058645753D+01 0.142016425779989D+01 0.140044984200005D+01 0.142320460923051D+01 0.147143144948458D+01 0.154521752035314D+01 0.164288286036013D+01 0.176530748640158D+01 0.191808643287189D+01 0.211380060410493D+01 0.237894191871313D+01 0.271042995532544D+01 0.307545901755135D+01 0.360298866421777D+01 0.455972063064414D+01 0.586464784873036D+01 0.748732674032193D+01 0.121921943183767D+02 0.249496601935811D+02 0.439263947580892D+02 0.578861277049492D+02 0.475892421098079D+02 0.824947500427442D+01 -0.326357989201409D+02 -0.484537207403618D+02 -0.420804890097171D+02 -0.258164426135948D+02 -0.164899484804587D+02 -0.112066008883749D+02 -0.815860189137763D+01 -0.629473892289678D+01 -0.505950257599030D+01 -0.418269323964104D+01 -0.353401487791005D+01 -0.304279928706630D+01 -0.266335465379741D+01 -0.236352694400754D+01 -0.212114535494301D+01 -0.183877228225660D+01 -0.161664650767168D+01 -0.143804266044267D+01 -0.129170471634465D+01 -0.116983010738703D+01 -0.106689173358376D+01 -0.978882399191305D+00 -0.902824528309920D+00 -0.836456455867718D+00 -0.778030629395299D+00 -0.726178775731778D+00 -0.679817000864280D+00 -0.638076525028564D+00 -0.600252695813208D+00 -0.565767810299378D+00 -0.534144240965095D+00 -0.504984821910748D+00 -0.477957999910350D+00 -0.452785944942136D+00 -0.429234508271259D+00 -0.407104478323261D+00 -0.386223958144805D+00 -0.366441882196922D+00 -0.347622748440024D+00 -0.329642614980696D+00 -0.312386341042581D+00 -0.295745971178318D+00 -0.279620088911581D+00 -0.263913914719804D+00 -0.248539898602407D+00 -0.233418560505738D+00 -0.218479359496149D+00 -0.203661416849354D+00 -0.188913973053206D+00 -0.174196513977320D+00 -0.159478552068659D+00 -0.144739088981938D+00 -0.129965814097965D+00 -0.115154108912829D+00 -0.100305931717282D+00 -0.854286517865122D-01 -0.705338914014364D-01 -0.556364190595904D-01 -0.407531212670564D-01 -0.259020653325948D-01 -0.111016524650953D-01 0.363014915960580D-02 0.182765077777480D-01 0.328223869888733D-01 0.471488534453668D-01 0.461092414494324D-01 0.449826950188470D-01 0.438744832664817D-01 0.427832858218569D-01 0.417078796988157D-01 0.406471321601209D-01 0.395999940827618D-01 0.385654937073987D-01 0.375427309351473D-01 0.365308719962876D-01 0.355291444043004D-01 0.345368324083939D-01 0.335532726469800D-01 0.325778501675256D-01 0.316099947073045D-01 0.306491772272821D-01 0.296949067968288D-01 0.287467275139619D-01 0.278042158707859D-01 0.268669781577913D-01 0.259346481723544D-01 0.250068849738661D-01 0.240833709963528D-01 0.231638100756104D-01 0.222479258438213D-01 0.213354601463767D-01 0.204261715153198D-01 0.195198339159042D-01 0.186162354842700D-01 0.177151773439466D-01 0.168164726110920D-01 0.159199453553249D-01 0.150254297259789D-01 0.141327691416393D-01 0.132418153719893D-01 0.123524280248866D-01 0.114644736115554D-01 0.105778251258126D-01 0.969236131465046D-02 0.880796613755841D-02 0.792452827025336D-02 0.704194053180451D-02 0.616009951048824D-02 0.527890492540983D-02 0.439825939446692D-02 0.351806782372677D-02 0.263823713320122D-02 0.175867573837252D-02 0.879293234890000D-03 0.000000000000000D+00 SHAR_EOF fi # end of overwriting check if test -f 'res4_2' then echo shar: will not over-write existing file "'res4_2'" else cat << "SHAR_EOF" > 'res4_2' DNSPLIN1 Output Domain: T(1) = 0.000D+00, T(N) = 0.100D+02 Number of data points: N = 10 Number of grid points: M = 251 Mesh width: H = 0.400000D-01 # CG steps between restarts: MAXCG = 3 Line search tolerance: FMTOL = 1.000D-06 Convergence tolerance: PHTOL = 1.000D-03 Max number of iterations: NGMAX = 200 Iteration 1 (Steepest descent) Functional: phi(F) = 1.204285303543998D+01 Mean absolute L2-gradient: GNRM1 = 8.93D-01 Max-norm of L2-gradient: GNRMM = 2.11D+01 Line search: No. phi evals NPHV = 33 Optimal step-size S = 1.525D+01 Functional phi(Y) = 4.210114047965495D+00 Relative change in phi(Y) DPHI = 6.01D-01 Squared relative change in Y: DY = 1.85D-03 Cubed S-gradient rel. to Y: DG = 2.25D-08 _________________________________________________________________ Iteration 2 (Conjugate gradient) Functional: phi(F) = 4.210114047965495D+00 Mean absolute L2-gradient: GNRM1 = 4.80D-01 Max-norm of L2-gradient: GNRMM = 1.21D+01 Line search: No. phi evals NPHV = 35 Optimal step-size S = 2.276D+01 Functional phi(Y) = 3.616846786346256D+00 Relative change in phi(Y) DPHI = 1.14D-01 Squared relative change in Y: DY = 4.18D-04 Cubed S-gradient rel. to Y: DG = 8.84D-10 _________________________________________________________________ Iteration 3 (Conjugate gradient) Functional: phi(F) = 3.616846786346256D+00 Mean absolute L2-gradient: GNRM1 = 3.60D-01 Max-norm of L2-gradient: GNRMM = 1.01D+01 Line search: No. phi evals NPHV = 35 Optimal step-size S = 2.140D+01 Functional phi(Y) = 3.378654389247692D+00 Relative change in phi(Y) DPHI = 5.16D-02 Squared relative change in Y: DY = 2.32D-04 Cubed S-gradient rel. to Y: DG = 3.30D-10 _________________________________________________________________ Iteration 4 (Conjugate gradient) Functional: phi(F) = 3.378654389247692D+00 Mean absolute L2-gradient: GNRM1 = 2.51D-01 Max-norm of L2-gradient: GNRMM = 8.09D+00 Line search: No. phi evals NPHV = 35 Optimal step-size S = 2.526D+01 Functional phi(Y) = 3.254592507777017D+00 Relative change in phi(Y) DPHI = 2.83D-02 Squared relative change in Y: DY = 8.05D-05 Cubed S-gradient rel. to Y: DG = 3.54D-11 _________________________________________________________________ Iteration 5 (Steepest descent) Functional: phi(F) = 3.254592507777017D+00 Mean absolute L2-gradient: GNRM1 = 2.09D-01 Max-norm of L2-gradient: GNRMM = 7.18D+00 Line search: No. phi evals NPHV = 32 Optimal step-size S = 2.019D+01 Functional phi(Y) = 3.182797745867247D+00 Relative change in phi(Y) DPHI = 1.69D-02 Squared relative change in Y: DY = 7.66D-05 Cubed S-gradient rel. to Y: DG = 8.13D-11 _________________________________________________________________ Iteration 6 (Conjugate gradient) Functional: phi(F) = 3.182797745867247D+00 Mean absolute L2-gradient: GNRM1 = 1.33D-01 Max-norm of L2-gradient: GNRMM = 5.08D+00 Line search: No. phi evals NPHV = 40 Optimal step-size S = 2.636D+01 Functional phi(Y) = 3.128928284031733D+00 Relative change in phi(Y) DPHI = 1.29D-02 Squared relative change in Y: DY = 3.26D-05 Cubed S-gradient rel. to Y: DG = 9.64D-12 _________________________________________________________________ Iteration 7 (Conjugate gradient) Functional: phi(F) = 3.128928284031733D+00 Mean absolute L2-gradient: GNRM1 = 1.32D-01 Max-norm of L2-gradient: GNRMM = 5.58D+00 Line search: No. phi evals NPHV = 36 Optimal step-size S = 1.392D+01 Functional phi(Y) = 3.095857069635267D+00 Relative change in phi(Y) DPHI = 8.01D-03 Squared relative change in Y: DY = 9.83D-05 Cubed S-gradient rel. to Y: DG = 3.52D-11 _________________________________________________________________ Iteration 8 (Conjugate gradient) Functional: phi(F) = 3.095857069635267D+00 Mean absolute L2-gradient: GNRM1 = 2.32D-01 Max-norm of L2-gradient: GNRMM = 8.85D+00 Line search: No. phi evals NPHV = 34 Optimal step-size S = 1.474D+01 Functional phi(Y) = 3.042483566893213D+00 Relative change in phi(Y) DPHI = 1.30D-02 Squared relative change in Y: DY = 1.91D-05 Cubed S-gradient rel. to Y: DG = 1.84D-11 _________________________________________________________________ Iteration 9 (Steepest descent) Functional: phi(F) = 3.042483566893213D+00 Mean absolute L2-gradient: GNRM1 = 7.36D-02 Max-norm of L2-gradient: GNRMM = 2.00D+00 Line search: No. phi evals NPHV = 38 Optimal step-size S = 5.026D+01 Functional phi(Y) = 3.012634184165759D+00 Relative change in phi(Y) DPHI = 7.38D-03 Squared relative change in Y: DY = 2.96D-05 Cubed S-gradient rel. to Y: DG = 1.27D-12 _________________________________________________________________ Iteration 10 (Conjugate gradient) Functional: phi(F) = 3.012634184165759D+00 Mean absolute L2-gradient: GNRM1 = 1.34D-01 Max-norm of L2-gradient: GNRMM = 5.58D+00 Line search: No. phi evals NPHV = 33 Optimal step-size S = 5.515D+00 Functional phi(Y) = 3.004014685340456D+00 Relative change in phi(Y) DPHI = 2.15D-03 Squared relative change in Y: DY = 2.25D-05 Cubed S-gradient rel. to Y: DG = 1.35D-11 _________________________________________________________________ Iteration 11 (Conjugate gradient) Functional: phi(F) = 3.004014685340456D+00 Mean absolute L2-gradient: GNRM1 = 2.02D-01 Max-norm of L2-gradient: GNRMM = 7.62D+00 Line search: No. phi evals NPHV = 34 Optimal step-size S = 1.666D+01 Functional phi(Y) = 2.962390005206303D+00 Relative change in phi(Y) DPHI = 1.04D-02 Squared relative change in Y: DY = 6.47D-05 Cubed S-gradient rel. to Y: DG = 1.79D-11 _________________________________________________________________ Iteration 12 (Conjugate gradient) Functional: phi(F) = 2.962390005206303D+00 Mean absolute L2-gradient: GNRM1 = 1.04D-01 Max-norm of L2-gradient: GNRMM = 4.11D+00 Line search: No. phi evals NPHV = 37 Optimal step-size S = 3.052D+01 Functional phi(Y) = 2.949053121332670D+00 Relative change in phi(Y) DPHI = 3.37D-03 Squared relative change in Y: DY = 2.35D-06 Cubed S-gradient rel. to Y: DG = 4.38D-13 _________________________________________________________________ Iteration 13 (Steepest descent) Functional: phi(F) = 2.949053121332670D+00 Mean absolute L2-gradient: GNRM1 = 8.56D-02 Max-norm of L2-gradient: GNRMM = 2.91D+00 Line search: No. phi evals NPHV = 37 Optimal step-size S = 2.008D+01 Functional phi(Y) = 2.940464310249708D+00 Relative change in phi(Y) DPHI = 2.17D-03 Squared relative change in Y: DY = 5.51D-06 Cubed S-gradient rel. to Y: DG = 1.60D-12 _________________________________________________________________ Iteration 14 (Conjugate gradient) Functional: phi(F) = 2.940464310249708D+00 Mean absolute L2-gradient: GNRM1 = 5.35D-02 Max-norm of L2-gradient: GNRMM = 1.92D+00 Line search: No. phi evals NPHV = 38 Optimal step-size S = 5.226D+01 Functional phi(Y) = 2.926268282662580D+00 Relative change in phi(Y) DPHI = 3.60D-03 Squared relative change in Y: DY = 1.70D-05 Cubed S-gradient rel. to Y: DG = 2.10D-13 _________________________________________________________________ Iteration 15 (Conjugate gradient) Functional: phi(F) = 2.926268282662580D+00 Mean absolute L2-gradient: GNRM1 = 8.96D-02 Max-norm of L2-gradient: GNRMM = 4.14D+00 Line search: No. phi evals NPHV = 34 Optimal step-size S = 4.680D+00 Functional phi(Y) = 2.923118283615815D+00 Relative change in phi(Y) DPHI = 8.02D-04 Squared relative change in Y: DY = 1.08D-05 Cubed S-gradient rel. to Y: DG = 2.98D-12 _________________________________________________________________ Number of descent iterations: 15 Total number of phi evaluations in the line searches: 531 Total polygonal curve length: 0.174D+02 SHAR_EOF fi # end of overwriting check if test -f 'res5' then echo shar: will not over-write existing file "'res5'" else cat << "SHAR_EOF" > 'res5' 251 0.000000000000000D+00 0.440799474168516D-02 0.882476167834436D-02 0.132591830511907D-01 0.177203485857825D-01 0.222176287396447D-01 0.267607171516918D-01 0.313596515556571D-01 0.360248618136172D-01 0.407673721694180D-01 0.455993997383134D-01 0.505356600832790D-01 0.555953909224607D-01 0.608042195923146D-01 0.661948665399826D-01 0.718068604964960D-01 0.776856847806087D-01 0.838806218898214D-01 0.904394079965520D-01 0.973980287701440D-01 0.104767788984078D+00 0.112531977193465D+00 0.120678311688373D+00 0.129291429259038D+00 0.138716548313947D+00 0.150000000000000D+00 0.166401434535658D+00 0.189251997120678D+00 0.219497272334715D+00 0.257663827885682D+00 0.303760020462274D+00 0.357176361186135D+00 0.416643027108557D+00 0.480293372140423D+00 0.545849698164677D+00 0.610901036555397D+00 0.673205226381606D+00 0.730939257164103D+00 0.782845373764767D+00 0.828260347473041D+00 0.867050497637863D+00 0.899492436004590D+00 0.926138609841402D+00 0.947695093709938D+00 0.964925271658750D+00 0.978582328214420D+00 0.989367244588111D+00 0.997906253748587D+00 0.100474061554916D+01 0.101032097759917D+01 0.101500000000000D+01 0.101902450232207D+01 0.102253650351391D+01 0.102560426832295D+01 0.102826628586910D+01 0.103054981231883D+01 0.103247402312686D+01 0.103404950347089D+01 0.103527900101792D+01 0.103616018012883D+01 0.103669081745834D+01 0.103688050908443D+01 0.103675528570844D+01 0.103631502344321D+01 0.103555118137393D+01 0.103445487544066D+01 0.103301436838783D+01 0.103121601222133D+01 0.102904395967944D+01 0.102647951069637D+01 0.102350067940572D+01 0.102007766450085D+01 0.101615847199794D+01 0.101164404638610D+01 0.100635623386804D+01 0.100000000000000D+01 0.992116673832216D+00 0.982148842838406D+00 0.969443145463329D+00 0.953296327272147D+00 0.933040086641261D+00 0.908175776415951D+00 0.878550714309361D+00 0.844534595883538D+00 0.807121473811576D+00 0.767878608900026D+00 0.728712502897703D+00 0.691511251632445D+00 0.657793337439092D+00 0.628490005799053D+00 0.603913333081627D+00 0.583873226961858D+00 0.567860689277939D+00 0.555222648755347D+00 0.545289217122113D+00 0.537447815491986D+00 0.531177269301268D+00 0.526059708066972D+00 0.521783366086725D+00 0.518138524905442D+00 0.515000000000000D+00 0.512295777841186D+00 0.509948630382065D+00 0.507900678405655D+00 0.506109374533249D+00 0.504544231553352D+00 0.503183546167682D+00 0.502011287423026D+00 0.501014344071120D+00 0.500180494383996D+00 0.499497539257462D+00 0.498953500755752D+00 0.498537043117329D+00 0.498237555065245D+00 0.498044986373556D+00 0.497949584105531D+00 0.497941588293425D+00 0.498010957421007D+00 0.498147185375798D+00 0.498339233174523D+00 0.498575565224201D+00 0.498844262653010D+00 0.499133181627791D+00 0.499430126584408D+00 0.499723012971082D+00 0.500000000000000D+00 0.500249433406512D+00 0.500472508645179D+00 0.500670039869927D+00 0.500842775913276D+00 0.500991426540981D+00 0.501116680866408D+00 0.501219219670457D+00 0.501299723238891D+00 0.501358876108372D+00 0.501397369844829D+00 0.501415904699684D+00 0.501415190727686D+00 0.501395948721058D+00 0.501358911128070D+00 0.501304822984945D+00 0.501234442798337D+00 0.501148543267572D+00 0.501047911723557D+00 0.500933350175273D+00 0.500805674885329D+00 0.500665715434596D+00 0.500514313275671D+00 0.500352319810904D+00 0.500180594059720D+00 0.500000000000000D+00 0.499811428401430D+00 0.499617640211773D+00 0.499421417648075D+00 0.499225536379057D+00 0.499032763136931D+00 0.498845853549514D+00 0.498667550295643D+00 0.498500581686798D+00 0.498347660778600D+00 0.498211485117458D+00 0.498094737229941D+00 0.498000085965434D+00 0.497930188806243D+00 0.497887695263367D+00 0.497875251480426D+00 0.497895506172147D+00 0.497951118026520D+00 0.498044764700153D+00 0.498179153532926D+00 0.498357034099147D+00 0.498581212696149D+00 0.498854568845695D+00 0.499180073846566D+00 0.499560811366719D+00 0.500000000000000D+00 0.500501203593948D+00 0.501052683380219D+00 0.501642434043030D+00 0.502258117667284D+00 0.502887162001268D+00 0.503516875645952D+00 0.504134571666939D+00 0.504727691309496D+00 0.505283919387322D+00 0.505791282536212D+00 0.506238221114622D+00 0.506613625574142D+00 0.506906829169100D+00 0.507107550848327D+00 0.507205783355480D+00 0.507191620063803D+00 0.507055015373421D+00 0.506785490696204D+00 0.506371813254597D+00 0.505801624190642D+00 0.505060897468267D+00 0.504133114642811D+00 0.502998153489948D+00 0.501630954647072D+00 0.500000000000000D+00 0.498065914599535D+00 0.495808696811034D+00 0.493205260562025D+00 0.490225154447845D+00 0.486821325662370D+00 0.482917145914036D+00 0.478393737081006D+00 0.473081693743244D+00 0.466759452076697D+00 0.459158887228118D+00 0.449978926695639D+00 0.438909555460924D+00 0.425669207165122D+00 0.410056147034983D+00 0.392008560957179D+00 0.371660193404143D+00 0.349372398933863D+00 0.325724466660452D+00 0.301454865783098D+00 0.277363575787461D+00 0.254201193805970D+00 0.232575205899501D+00 0.212895288058283D+00 0.195363428546399D+00 0.180000000000000D+00 0.166681593985013D+00 0.154891057140254D+00 0.144266504000109D+00 0.134551567129064D+00 0.125559764557942D+00 0.117152309713125D+00 0.109223798216712D+00 0.101692695502180D+00 0.944948519052193D-01 0.875789839828490D-01 0.809034655959049D-01 0.744340106632487D-01 0.681419744280470D-01 0.620030907584086D-01 0.559965212049065D-01 0.501041297318100D-01 0.443099225905705D-01 0.385996101803048D-01 0.329602597203764D-01 0.273800159145190D-01 0.218478726640446D-01 0.163534830492060D-01 0.108869977512750D-01 0.543892417660951D-02 0.000000000000000D+00 0.110199868542129D+01 0.110309520979305D+01 0.110639853868819D+01 0.111194836342976D+01 0.111980571105675D+01 0.113004607073866D+01 0.114275285200155D+01 0.115801808274068D+01 0.117596507672011D+01 0.119681724058702D+01 0.122103598923263D+01 0.124949889801841D+01 0.128356993862946D+01 0.132493445219025D+01 0.137533011302266D+01 0.143635228007826D+01 0.150922017416568D+01 0.159421540199291D+01 0.168967586004033D+01 0.179104762344075D+01 0.189174355291517D+01 0.198881533803690D+01 0.209493150819658D+01 0.225477957819668D+01 0.258857134262024D+01 0.346061077771392D+01 0.490649964008478D+01 0.663697972488218D+01 0.855147884562547D+01 0.105328435159448D+02 0.124390666625566D+02 0.141103758307854D+02 0.153896263692861D+02 0.161508338820151D+02 0.163259580518718D+02 0.159194410271160D+02 0.150047775760882D+02 0.137050184228951D+02 0.121651362886173D+02 0.105256404841370D+02 0.890401106644363D+01 0.738601402544238D+01 0.602533221316846D+01 0.484833272716846D+01 0.386090431306034D+01 0.305524661617022D+01 0.241549069177081D+01 0.192167137013072D+01 0.155184048132345D+01 0.128242305635534D+01 0.108794059036216D+01 0.942062939238486D+00 0.822470750110410D+00 0.716222794399035D+00 0.618192999484818D+00 0.525967157219948D+00 0.437461394007105D+00 0.350622236381992D+00 0.263834582242189D+00 0.176477055052748D+00 0.900411194496853D-01 0.805853126309430D-02 -0.706857051515630D-01 -0.150513041813932D+00 -0.232518500319023D+00 -0.317101623262761D+00 -0.404857902416567D+00 -0.496301088548617D+00 -0.592062690620204D+00 -0.692910034214844D+00 -0.800230774440108D+00 -0.917775925972836D+00 -0.105420226434266D+01 -0.122527976623701D+01 -0.145550579826303D+01 -0.177994500447831D+01 -0.223139464519928D+01 -0.283419104611084D+01 -0.360656444578229D+01 -0.455038235275855D+01 -0.564006885702457D+01 -0.681117154148750D+01 -0.795514756655162D+01 -0.892865506222305D+01 -0.958199837293898D+01 -0.980112136423418D+01 -0.954591965844763D+01 -0.886489568232636D+01 -0.787765572917398D+01 -0.673500054468318D+01 -0.557709735464937D+01 -0.450658047546092D+01 -0.358132227581386D+01 -0.282143401947822D+01 -0.222185415792013D+01 -0.176399347760572D+01 -0.142351342812679D+01 -0.117423790181782D+01 -0.990147895191265D+00 -0.847920760840629D+00 -0.730343383031989D+00 -0.631421202241841D+00 -0.549387429441314D+00 -0.479906981102021D+00 -0.419555856537968D+00 -0.365728545695929D+00 -0.316618016290682D+00 -0.271150262070169D+00 -0.228849129878778D+00 -0.189600601707300D+00 -0.153374203530461D+00 -0.120062017516652D+00 -0.894932113134558D-01 -0.615070929715425D-01 -0.359963699641599D-01 -0.129247600164015D-01 0.767166443439021D-02 0.256996352966249D-01 0.410344691895090D-01 0.535474810502978D-01 0.631286848108981D-01 0.697020504488027D-01 0.732329914247681D-01 0.737289179114017D-01 0.712341769490074D-01 0.658025544287774D-01 0.590635806473339D-01 0.525758079267941D-01 0.462834085121488D-01 0.401733338817600D-01 0.342381191414665D-01 0.284741411845785D-01 0.228802965604180D-01 0.174570547392811D-01 0.122058257422120D-01 0.712857391399480D-02 0.222761035720276D-02 -0.249449732825369D-02 -0.703494995202281D-02 -0.113907170140176D-01 -0.155585412165982D-01 -0.195349646716775D-01 -0.233163843475770D-01 -0.268991365374310D-01 -0.302796047785131D-01 -0.334543425845740D-01 -0.364202012071574D-01 -0.391744529615323D-01 -0.417149019939084D-01 -0.440399763629723D-01 -0.461457072862131D-01 -0.477949735283659D-01 -0.487513441694357D-01 -0.490129790895535D-01 -0.485818138929797D-01 -0.474603536928520D-01 -0.456516051609915D-01 -0.431589828394294D-01 -0.399861896303311D-01 -0.361370711675080D-01 -0.316154435824542D-01 -0.264248940030284D-01 -0.205685529621746D-01 -0.140488377584069D-01 -0.686716572717572D-02 0.976363597512964D-03 0.948331826173404D-02 0.186573160007447D-01 0.285044383008179D-01 0.390336748742476D-01 0.502573954028057D-01 0.621918433185362D-01 0.748576438021273D-01 0.882803151280101D-01 0.102490769179266D+00 0.117549028403552D+00 0.131585422527433D+00 0.142653806135332D+00 0.150679285883026D+00 0.155590994779770D+00 0.157344747333601D+00 0.155926208208867D+00 0.151351957942941D+00 0.143668465047792D+00 0.132948903339550D+00 0.119287715912533D+00 0.102792879741201D+00 0.835760068097213D-01 0.617406592730851D-01 0.373692732975744D-01 0.105086519345543D-01 -0.188459977574773D-01 -0.507661709499008D-01 -0.854002648529584D-01 -0.122983313195185D+00 -0.163864473291295D+00 -0.208563693478880D+00 -0.257842997289870D+00 -0.312769999467388D+00 -0.374769186243448D+00 -0.445630005942221D+00 -0.523912898620783D+00 -0.607581754688648D+00 -0.697942795398580D+00 -0.797991862456958D+00 -0.913501066726191D+00 -0.105344857267051D+01 -0.122943152134900D+01 -0.145428562553856D+01 -0.174035081439065D+01 -0.209756567263227D+01 -0.253116647089933D+01 -0.303871494131459D+01 -0.360667605324255D+01 -0.420758077599293D+01 -0.479949420385509D+01 -0.532952025291443D+01 -0.574196584296131D+01 -0.598969164384566D+01 -0.604511135912395D+01 -0.590670899714098D+01 -0.559854623599498D+01 -0.516323821846093D+01 -0.465147216913777D+01 -0.411191100728536D+01 -0.358522932017320D+01 -0.313861785746830D+01 -0.280188624811305D+01 -0.254243625139872D+01 -0.233834243027077D+01 -0.217490717699238D+01 -0.204199579265385D+01 -0.193245177636815D+01 -0.184111828893652D+01 -0.176421393991632D+01 -0.169892328866430D+01 -0.164312166495004D+01 -0.159518639598224D+01 -0.155386498810502D+01 -0.151818165289256D+01 -0.148737012832483D+01 -0.146082482679200D+01 -0.143806494393814D+01 -0.141870785877426D+01 -0.140244928322323D+01 -0.138904838204148D+01 -0.137831660816413D+01 -0.137010936409620D+01 -0.136431985907456D+01 -0.136087471890937D+01 -0.135973104415238D+01 0.000000000000000D+00 0.548262185877781D+00 0.110340226169647D+01 0.167151010908829D+01 0.225716370440450D+01 0.286301613655312D+01 0.349037449488853D+01 0.414224087467866D+01 0.483125611503614D+01 0.559482581841911D+01 0.651454850438340D+01 0.771690588850576D+01 0.931861441702065D+01 0.113636423633733D+02 0.138341880528354D+02 0.166768954749626D+02 0.197570515687480D+02 0.227405623448680D+02 0.249896666788410D+02 0.256962150213674D+02 0.246517497158446D+02 0.238841428450197D+02 0.291739422348218D+02 0.507500927652265D+02 0.116145789446553D+03 0.319873928100286D+03 0.403070503085147D+03 0.462169539313552D+03 0.495080021058091D+03 0.495602314101576D+03 0.457509259204309D+03 0.378145324910099D+03 0.261479944340243D+03 0.119123812024256D+03 -0.315617270959037D+02 -0.171696785281963D+03 -0.285634940231969D+03 -0.364244636364565D+03 -0.405696430774358D+03 -0.414051471465754D+03 -0.396763237380950D+03 -0.362235283119676D+03 -0.318105623017283D+03 -0.270394119982718D+03 -0.223320087071342D+03 -0.179508761373716D+03 -0.140369200825989D+03 -0.106540459994059D+03 -0.783749844095738D+02 -0.563337280744813D+02 -0.409075049221108D+02 -0.320313206397249D+02 -0.277647739243131D+02 -0.253592039313744D+02 -0.236556935257343D+02 -0.224572276067009D+02 -0.217956539997205D+02 -0.216239248128358D+02 -0.217699022570655D+02 -0.219088613376550D+02 -0.213091064638765D+02 -0.196821876294190D+02 -0.196899305779097D+02 -0.202237377532749D+02 -0.207789914992706D+02 -0.215125699725982D+02 -0.223655696043046D+02 -0.233560234617208D+02 -0.245247775740726D+02 -0.258988942232474D+02 -0.277614758893846D+02 -0.310110998769791D+02 -0.372020693079345D+02 -0.483366816392411D+02 -0.667763343737693D+02 -0.954432687338691D+02 -0.130281551626615D+03 -0.171116648829163D+03 -0.215070051006565D+03 -0.256838902481564D+03 -0.288004349651448D+03 -0.297546992580014D+03 -0.274441019952047D+03 -0.212312727883669D+03 -0.114358927474294D+03 0.479743182669329D+01 0.122803421066582D+03 0.217708566994053D+03 0.275911409582136D+03 0.295416182663266D+03 0.283535412353639D+03 0.251723027240587D+03 0.210906072582943D+03 0.169038055584873D+03 0.130751875194172D+03 0.981784649630307D+02 0.720615597764387D+02 0.525762033780422D+02 0.394687999352369D+02 0.316447672400813D+02 0.271439216642383D+02 0.223171687308357D+02 0.186997176694279D+02 0.160405065002187D+02 0.141350557818082D+02 0.127785996392113D+02 0.117766650634121D+02 0.109572120468443D+02 0.101933540488514D+02 0.943091003688390D+01 0.868228905152868D+01 0.797380395537242D+01 0.731059914622564D+01 0.668246002473102D+01 0.607290147896025D+01 0.546290349491899D+01 0.483530873047686D+01 0.417867670064048D+01 0.348874024580156D+01 0.276776568459286D+01 0.202283619570726D+01 0.126384662324508D+01 0.501623864737621D+00 -0.253660621420820D+00 -0.993709859776343D+00 -0.172210140033865D+01 -0.164738549038312D+01 -0.159650086988677D+01 -0.154969883743583D+01 -0.150533847775858D+01 -0.146226889238821D+01 -0.141972008605579D+01 -0.137720222602444D+01 -0.133441868454404D+01 -0.129119581399051D+01 -0.124743010011807D+01 -0.120305167827794D+01 -0.115800216445028D+01 -0.111222414743428D+01 -0.106565938356312D+01 -0.101825271772715D+01 -0.969959009812504D+00 -0.920750828137251D+00 -0.870625266789771D+00 -0.819608853751264D+00 -0.767760049279198D+00 -0.715169262012483D+00 -0.661956615174986D+00 -0.608267901013038D+00 -0.554269283518927D+00 -0.498596178101496D+00 -0.326036942971397D+00 -0.152148377560030D+00 0.213309175010890D-01 0.194251680785823D+00 0.366478419278060D+00 0.537895846652175D+00 0.708415314128880D+00 0.877981290420271D+00 0.104657794099128D+01 0.121423585153560D+01 0.138103893817729D+01 0.154713158224962D+01 0.171272601963424D+01 0.187810999598137D+01 0.204365466636297D+01 0.220982266574757D+01 0.237717620375777D+01 0.254638494627882D+01 0.271823334043603D+01 0.289362692384304D+01 0.307359703402219D+01 0.325930320777337D+01 0.345203245516804D+01 0.365319457045973D+01 0.387593504168338D+01 0.314226202025730D+01 0.239192978369190D+01 0.162081009015547D+01 0.835044358216130D+00 0.418319186998306D-01 -0.751101481066829D+00 -0.153602365189631D+01 -0.230572279567853D+01 -0.305405805844233D+01 -0.377653565506592D+01 -0.447088243060029D+01 -0.513755403513949D+01 -0.578011973317860D+01 -0.640557325457675D+01 -0.702473742693333D+01 -0.765258741908248D+01 -0.830749917712925D+01 -0.900954777439955D+01 -0.978197639671385D+01 -0.106586036513409D+02 -0.116910064424519D+02 -0.129486454630429D+02 -0.145148556257163D+02 -0.164847377623137D+02 -0.189456720870729D+02 -0.201957742522046D+02 -0.216386537817241D+02 -0.235418665732422D+02 -0.264826669559466D+02 -0.312719351786700D+02 -0.387018177934878D+02 -0.492896565457597D+02 -0.631373955490185D+02 -0.798951988770259D+02 -0.987122302437866D+02 -0.118088168889741D+03 -0.135686066317892D+03 -0.148294489646088D+03 -0.152157871729099D+03 -0.143798842201982D+03 -0.121214182327689D+03 -0.850086126957493D+02 -0.388542877464253D+02 0.111444301072773D+02 0.580567508842063D+02 0.960246296887977D+02 0.121629379078225D+03 0.134253645583355D+03 0.135526935342852D+03 0.127813908213224D+03 0.954918231392248D+02 0.728739815384002D+02 0.568510168187687D+02 0.451958937452025D+02 0.365217328939967D+02 0.299339592752662D+02 0.248380488675846D+02 0.208286948482272D+02 0.176234796618732D+02 0.150218459641369D+02 0.128789658929967D+02 0.110886685909008D+02 0.957203534770936D+01 0.826963225851896D+01 0.713613002534860D+01 0.613652074106692D+01 0.524342068586227D+01 0.443512189607712D+01 0.369416587943849D+01 0.300628471143743D+01 0.235960222723657D+01 0.174401980672628D+01 0.115073270409802D+01 0.571837378495746D+00 0.000000000000000D+00 SHAR_EOF fi # end of overwriting check if test -f 'res5_1' then echo shar: will not over-write existing file "'res5_1'" else cat << "SHAR_EOF" > 'res5_1' 251 0.000000000000000D+00 0.440799474168516D-02 0.882476167834436D-02 0.132591830511907D-01 0.177203485857825D-01 0.222176287396447D-01 0.267607171516918D-01 0.313596515556571D-01 0.360248618136172D-01 0.407673721694180D-01 0.455993997383134D-01 0.505356600832790D-01 0.555953909224607D-01 0.608042195923146D-01 0.661948665399826D-01 0.718068604964960D-01 0.776856847806087D-01 0.838806218898214D-01 0.904394079965520D-01 0.973980287701440D-01 0.104767788984078D+00 0.112531977193465D+00 0.120678311688373D+00 0.129291429259038D+00 0.138716548313947D+00 0.150000000000000D+00 0.166401434535658D+00 0.189251997120678D+00 0.219497272334715D+00 0.257663827885682D+00 0.303760020462274D+00 0.357176361186135D+00 0.416643027108557D+00 0.480293372140423D+00 0.545849698164677D+00 0.610901036555397D+00 0.673205226381606D+00 0.730939257164103D+00 0.782845373764767D+00 0.828260347473041D+00 0.867050497637863D+00 0.899492436004590D+00 0.926138609841402D+00 0.947695093709938D+00 0.964925271658750D+00 0.978582328214420D+00 0.989367244588111D+00 0.997906253748587D+00 0.100474061554916D+01 0.101032097759917D+01 0.101500000000000D+01 0.101902450232207D+01 0.102253650351391D+01 0.102560426832295D+01 0.102826628586910D+01 0.103054981231883D+01 0.103247402312686D+01 0.103404950347089D+01 0.103527900101792D+01 0.103616018012883D+01 0.103669081745834D+01 0.103688050908443D+01 0.103675528570844D+01 0.103631502344321D+01 0.103555118137393D+01 0.103445487544066D+01 0.103301436838783D+01 0.103121601222133D+01 0.102904395967944D+01 0.102647951069637D+01 0.102350067940572D+01 0.102007766450085D+01 0.101615847199794D+01 0.101164404638610D+01 0.100635623386804D+01 0.100000000000000D+01 0.992116673832216D+00 0.982148842838406D+00 0.969443145463329D+00 0.953296327272147D+00 0.933040086641261D+00 0.908175776415951D+00 0.878550714309361D+00 0.844534595883538D+00 0.807121473811576D+00 0.767878608900026D+00 0.728712502897703D+00 0.691511251632445D+00 0.657793337439092D+00 0.628490005799053D+00 0.603913333081627D+00 0.583873226961858D+00 0.567860689277939D+00 0.555222648755347D+00 0.545289217122113D+00 0.537447815491986D+00 0.531177269301268D+00 0.526059708066972D+00 0.521783366086725D+00 0.518138524905442D+00 0.515000000000000D+00 0.512295777841186D+00 0.509948630382065D+00 0.507900678405655D+00 0.506109374533249D+00 0.504544231553352D+00 0.503183546167682D+00 0.502011287423026D+00 0.501014344071120D+00 0.500180494383996D+00 0.499497539257462D+00 0.498953500755752D+00 0.498537043117329D+00 0.498237555065245D+00 0.498044986373556D+00 0.497949584105531D+00 0.497941588293425D+00 0.498010957421007D+00 0.498147185375798D+00 0.498339233174523D+00 0.498575565224201D+00 0.498844262653010D+00 0.499133181627791D+00 0.499430126584408D+00 0.499723012971082D+00 0.500000000000000D+00 0.500249433406512D+00 0.500472508645179D+00 0.500670039869927D+00 0.500842775913276D+00 0.500991426540981D+00 0.501116680866408D+00 0.501219219670457D+00 0.501299723238891D+00 0.501358876108372D+00 0.501397369844829D+00 0.501415904699684D+00 0.501415190727686D+00 0.501395948721058D+00 0.501358911128070D+00 0.501304822984945D+00 0.501234442798337D+00 0.501148543267572D+00 0.501047911723557D+00 0.500933350175273D+00 0.500805674885329D+00 0.500665715434596D+00 0.500514313275671D+00 0.500352319810904D+00 0.500180594059720D+00 0.500000000000000D+00 0.499811428401430D+00 0.499617640211773D+00 0.499421417648075D+00 0.499225536379057D+00 0.499032763136931D+00 0.498845853549514D+00 0.498667550295643D+00 0.498500581686798D+00 0.498347660778600D+00 0.498211485117458D+00 0.498094737229941D+00 0.498000085965434D+00 0.497930188806243D+00 0.497887695263367D+00 0.497875251480426D+00 0.497895506172147D+00 0.497951118026520D+00 0.498044764700153D+00 0.498179153532926D+00 0.498357034099147D+00 0.498581212696149D+00 0.498854568845695D+00 0.499180073846566D+00 0.499560811366719D+00 0.500000000000000D+00 0.500501203593948D+00 0.501052683380219D+00 0.501642434043030D+00 0.502258117667284D+00 0.502887162001268D+00 0.503516875645952D+00 0.504134571666939D+00 0.504727691309496D+00 0.505283919387322D+00 0.505791282536212D+00 0.506238221114622D+00 0.506613625574142D+00 0.506906829169100D+00 0.507107550848327D+00 0.507205783355480D+00 0.507191620063803D+00 0.507055015373421D+00 0.506785490696204D+00 0.506371813254597D+00 0.505801624190642D+00 0.505060897468267D+00 0.504133114642811D+00 0.502998153489948D+00 0.501630954647072D+00 0.500000000000000D+00 0.498065914599535D+00 0.495808696811034D+00 0.493205260562025D+00 0.490225154447845D+00 0.486821325662370D+00 0.482917145914036D+00 0.478393737081006D+00 0.473081693743244D+00 0.466759452076697D+00 0.459158887228118D+00 0.449978926695639D+00 0.438909555460924D+00 0.425669207165122D+00 0.410056147034983D+00 0.392008560957179D+00 0.371660193404143D+00 0.349372398933863D+00 0.325724466660452D+00 0.301454865783098D+00 0.277363575787461D+00 0.254201193805970D+00 0.232575205899501D+00 0.212895288058283D+00 0.195363428546399D+00 0.180000000000000D+00 0.166681593985013D+00 0.154891057140254D+00 0.144266504000109D+00 0.134551567129064D+00 0.125559764557942D+00 0.117152309713125D+00 0.109223798216712D+00 0.101692695502180D+00 0.944948519052193D-01 0.875789839828490D-01 0.809034655959049D-01 0.744340106632487D-01 0.681419744280470D-01 0.620030907584086D-01 0.559965212049065D-01 0.501041297318100D-01 0.443099225905705D-01 0.385996101803048D-01 0.329602597203764D-01 0.273800159145190D-01 0.218478726640446D-01 0.163534830492060D-01 0.108869977512750D-01 0.543892417660951D-02 0.000000000000000D+00 0.110199868542129D+01 0.110309520979305D+01 0.110639853868819D+01 0.111194836342976D+01 0.111980571105675D+01 0.113004607073866D+01 0.114275285200155D+01 0.115801808274068D+01 0.117596507672011D+01 0.119681724058702D+01 0.122103598923263D+01 0.124949889801841D+01 0.128356993862946D+01 0.132493445219025D+01 0.137533011302266D+01 0.143635228007826D+01 0.150922017416568D+01 0.159421540199291D+01 0.168967586004033D+01 0.179104762344075D+01 0.189174355291517D+01 0.198881533803690D+01 0.209493150819658D+01 0.225477957819668D+01 0.258857134262024D+01 0.346061077771392D+01 0.490649964008478D+01 0.663697972488218D+01 0.855147884562547D+01 0.105328435159448D+02 0.124390666625566D+02 0.141103758307854D+02 0.153896263692861D+02 0.161508338820151D+02 0.163259580518718D+02 0.159194410271160D+02 0.150047775760882D+02 0.137050184228951D+02 0.121651362886173D+02 0.105256404841370D+02 0.890401106644363D+01 0.738601402544238D+01 0.602533221316846D+01 0.484833272716846D+01 0.386090431306034D+01 0.305524661617022D+01 0.241549069177081D+01 0.192167137013072D+01 0.155184048132345D+01 0.128242305635534D+01 0.108794059036216D+01 0.942062939238486D+00 0.822470750110410D+00 0.716222794399035D+00 0.618192999484818D+00 0.525967157219948D+00 0.437461394007105D+00 0.350622236381992D+00 0.263834582242189D+00 0.176477055052748D+00 0.900411194496853D-01 0.805853126309430D-02 -0.706857051515630D-01 -0.150513041813932D+00 -0.232518500319023D+00 -0.317101623262761D+00 -0.404857902416567D+00 -0.496301088548617D+00 -0.592062690620204D+00 -0.692910034214844D+00 -0.800230774440108D+00 -0.917775925972836D+00 -0.105420226434266D+01 -0.122527976623701D+01 -0.145550579826303D+01 -0.177994500447831D+01 -0.223139464519928D+01 -0.283419104611084D+01 -0.360656444578229D+01 -0.455038235275855D+01 -0.564006885702457D+01 -0.681117154148750D+01 -0.795514756655162D+01 -0.892865506222305D+01 -0.958199837293898D+01 -0.980112136423418D+01 -0.954591965844763D+01 -0.886489568232636D+01 -0.787765572917398D+01 -0.673500054468318D+01 -0.557709735464937D+01 -0.450658047546092D+01 -0.358132227581386D+01 -0.282143401947822D+01 -0.222185415792013D+01 -0.176399347760572D+01 -0.142351342812679D+01 -0.117423790181782D+01 -0.990147895191265D+00 -0.847920760840629D+00 -0.730343383031989D+00 -0.631421202241841D+00 -0.549387429441314D+00 -0.479906981102021D+00 -0.419555856537968D+00 -0.365728545695929D+00 -0.316618016290682D+00 -0.271150262070169D+00 -0.228849129878778D+00 -0.189600601707300D+00 -0.153374203530461D+00 -0.120062017516652D+00 -0.894932113134558D-01 -0.615070929715425D-01 -0.359963699641599D-01 -0.129247600164015D-01 0.767166443439021D-02 0.256996352966249D-01 0.410344691895090D-01 0.535474810502978D-01 0.631286848108981D-01 0.697020504488027D-01 0.732329914247681D-01 0.737289179114017D-01 0.712341769490074D-01 0.658025544287774D-01 0.590635806473339D-01 0.525758079267941D-01 0.462834085121488D-01 0.401733338817600D-01 0.342381191414665D-01 0.284741411845785D-01 0.228802965604180D-01 0.174570547392811D-01 0.122058257422120D-01 0.712857391399480D-02 0.222761035720276D-02 -0.249449732825369D-02 -0.703494995202281D-02 -0.113907170140176D-01 -0.155585412165982D-01 -0.195349646716775D-01 -0.233163843475770D-01 -0.268991365374310D-01 -0.302796047785131D-01 -0.334543425845740D-01 -0.364202012071574D-01 -0.391744529615323D-01 -0.417149019939084D-01 -0.440399763629723D-01 -0.461457072862131D-01 -0.477949735283659D-01 -0.487513441694357D-01 -0.490129790895535D-01 -0.485818138929797D-01 -0.474603536928520D-01 -0.456516051609915D-01 -0.431589828394294D-01 -0.399861896303311D-01 -0.361370711675080D-01 -0.316154435824542D-01 -0.264248940030284D-01 -0.205685529621746D-01 -0.140488377584069D-01 -0.686716572717572D-02 0.976363597512964D-03 0.948331826173404D-02 0.186573160007447D-01 0.285044383008179D-01 0.390336748742476D-01 0.502573954028057D-01 0.621918433185362D-01 0.748576438021273D-01 0.882803151280101D-01 0.102490769179266D+00 0.117549028403552D+00 0.131585422527433D+00 0.142653806135332D+00 0.150679285883026D+00 0.155590994779770D+00 0.157344747333601D+00 0.155926208208867D+00 0.151351957942941D+00 0.143668465047792D+00 0.132948903339550D+00 0.119287715912533D+00 0.102792879741201D+00 0.835760068097213D-01 0.617406592730851D-01 0.373692732975744D-01 0.105086519345543D-01 -0.188459977574773D-01 -0.507661709499008D-01 -0.854002648529584D-01 -0.122983313195185D+00 -0.163864473291295D+00 -0.208563693478880D+00 -0.257842997289870D+00 -0.312769999467388D+00 -0.374769186243448D+00 -0.445630005942221D+00 -0.523912898620783D+00 -0.607581754688648D+00 -0.697942795398580D+00 -0.797991862456958D+00 -0.913501066726191D+00 -0.105344857267051D+01 -0.122943152134900D+01 -0.145428562553856D+01 -0.174035081439065D+01 -0.209756567263227D+01 -0.253116647089933D+01 -0.303871494131459D+01 -0.360667605324255D+01 -0.420758077599293D+01 -0.479949420385509D+01 -0.532952025291443D+01 -0.574196584296131D+01 -0.598969164384566D+01 -0.604511135912395D+01 -0.590670899714098D+01 -0.559854623599498D+01 -0.516323821846093D+01 -0.465147216913777D+01 -0.411191100728536D+01 -0.358522932017320D+01 -0.313861785746830D+01 -0.280188624811305D+01 -0.254243625139872D+01 -0.233834243027077D+01 -0.217490717699238D+01 -0.204199579265385D+01 -0.193245177636815D+01 -0.184111828893652D+01 -0.176421393991632D+01 -0.169892328866430D+01 -0.164312166495004D+01 -0.159518639598224D+01 -0.155386498810502D+01 -0.151818165289256D+01 -0.148737012832483D+01 -0.146082482679200D+01 -0.143806494393814D+01 -0.141870785877426D+01 -0.140244928322323D+01 -0.138904838204148D+01 -0.137831660816413D+01 -0.137010936409620D+01 -0.136431985907456D+01 -0.136087471890937D+01 -0.135973104415238D+01 0.000000000000000D+00 0.548262185877781D+00 0.110340226169647D+01 0.167151010908829D+01 0.225716370440450D+01 0.286301613655312D+01 0.349037449488853D+01 0.414224087467866D+01 0.483125611503614D+01 0.559482581841911D+01 0.651454850438340D+01 0.771690588850576D+01 0.931861441702065D+01 0.113636423633733D+02 0.138341880528354D+02 0.166768954749626D+02 0.197570515687480D+02 0.227405623448680D+02 0.249896666788410D+02 0.256962150213674D+02 0.246517497158446D+02 0.238841428450197D+02 0.291739422348218D+02 0.507500927652265D+02 0.116145789446553D+03 0.319873928100286D+03 0.403070503085147D+03 0.462169539313552D+03 0.495080021058091D+03 0.495602314101576D+03 0.457509259204309D+03 0.378145324910099D+03 0.261479944340243D+03 0.119123812024256D+03 -0.315617270959037D+02 -0.171696785281963D+03 -0.285634940231969D+03 -0.364244636364565D+03 -0.405696430774358D+03 -0.414051471465754D+03 -0.396763237380950D+03 -0.362235283119676D+03 -0.318105623017283D+03 -0.270394119982718D+03 -0.223320087071342D+03 -0.179508761373716D+03 -0.140369200825989D+03 -0.106540459994059D+03 -0.783749844095738D+02 -0.563337280744813D+02 -0.409075049221108D+02 -0.320313206397249D+02 -0.277647739243131D+02 -0.253592039313744D+02 -0.236556935257343D+02 -0.224572276067009D+02 -0.217956539997205D+02 -0.216239248128358D+02 -0.217699022570655D+02 -0.219088613376550D+02 -0.213091064638765D+02 -0.196821876294190D+02 -0.196899305779097D+02 -0.202237377532749D+02 -0.207789914992706D+02 -0.215125699725982D+02 -0.223655696043046D+02 -0.233560234617208D+02 -0.245247775740726D+02 -0.258988942232474D+02 -0.277614758893846D+02 -0.310110998769791D+02 -0.372020693079345D+02 -0.483366816392411D+02 -0.667763343737693D+02 -0.954432687338691D+02 -0.130281551626615D+03 -0.171116648829163D+03 -0.215070051006565D+03 -0.256838902481564D+03 -0.288004349651448D+03 -0.297546992580014D+03 -0.274441019952047D+03 -0.212312727883669D+03 -0.114358927474294D+03 0.479743182669329D+01 0.122803421066582D+03 0.217708566994053D+03 0.275911409582136D+03 0.295416182663266D+03 0.283535412353639D+03 0.251723027240587D+03 0.210906072582943D+03 0.169038055584873D+03 0.130751875194172D+03 0.981784649630307D+02 0.720615597764387D+02 0.525762033780422D+02 0.394687999352369D+02 0.316447672400813D+02 0.271439216642383D+02 0.223171687308357D+02 0.186997176694279D+02 0.160405065002187D+02 0.141350557818082D+02 0.127785996392113D+02 0.117766650634121D+02 0.109572120468443D+02 0.101933540488514D+02 0.943091003688390D+01 0.868228905152868D+01 0.797380395537242D+01 0.731059914622564D+01 0.668246002473102D+01 0.607290147896025D+01 0.546290349491899D+01 0.483530873047686D+01 0.417867670064048D+01 0.348874024580156D+01 0.276776568459286D+01 0.202283619570726D+01 0.126384662324508D+01 0.501623864737621D+00 -0.253660621420820D+00 -0.993709859776343D+00 -0.172210140033865D+01 -0.164738549038312D+01 -0.159650086988677D+01 -0.154969883743583D+01 -0.150533847775858D+01 -0.146226889238821D+01 -0.141972008605579D+01 -0.137720222602444D+01 -0.133441868454404D+01 -0.129119581399051D+01 -0.124743010011807D+01 -0.120305167827794D+01 -0.115800216445028D+01 -0.111222414743428D+01 -0.106565938356312D+01 -0.101825271772715D+01 -0.969959009812504D+00 -0.920750828137251D+00 -0.870625266789771D+00 -0.819608853751264D+00 -0.767760049279198D+00 -0.715169262012483D+00 -0.661956615174986D+00 -0.608267901013038D+00 -0.554269283518927D+00 -0.498596178101496D+00 -0.326036942971397D+00 -0.152148377560030D+00 0.213309175010890D-01 0.194251680785823D+00 0.366478419278060D+00 0.537895846652175D+00 0.708415314128880D+00 0.877981290420271D+00 0.104657794099128D+01 0.121423585153560D+01 0.138103893817729D+01 0.154713158224962D+01 0.171272601963424D+01 0.187810999598137D+01 0.204365466636297D+01 0.220982266574757D+01 0.237717620375777D+01 0.254638494627882D+01 0.271823334043603D+01 0.289362692384304D+01 0.307359703402219D+01 0.325930320777337D+01 0.345203245516804D+01 0.365319457045973D+01 0.387593504168338D+01 0.314226202025730D+01 0.239192978369190D+01 0.162081009015547D+01 0.835044358216130D+00 0.418319186998306D-01 -0.751101481066829D+00 -0.153602365189631D+01 -0.230572279567853D+01 -0.305405805844233D+01 -0.377653565506592D+01 -0.447088243060029D+01 -0.513755403513949D+01 -0.578011973317860D+01 -0.640557325457675D+01 -0.702473742693333D+01 -0.765258741908248D+01 -0.830749917712925D+01 -0.900954777439955D+01 -0.978197639671385D+01 -0.106586036513409D+02 -0.116910064424519D+02 -0.129486454630429D+02 -0.145148556257163D+02 -0.164847377623137D+02 -0.189456720870729D+02 -0.201957742522046D+02 -0.216386537817241D+02 -0.235418665732422D+02 -0.264826669559466D+02 -0.312719351786700D+02 -0.387018177934878D+02 -0.492896565457597D+02 -0.631373955490185D+02 -0.798951988770259D+02 -0.987122302437866D+02 -0.118088168889741D+03 -0.135686066317892D+03 -0.148294489646088D+03 -0.152157871729099D+03 -0.143798842201982D+03 -0.121214182327689D+03 -0.850086126957493D+02 -0.388542877464253D+02 0.111444301072773D+02 0.580567508842063D+02 0.960246296887977D+02 0.121629379078225D+03 0.134253645583355D+03 0.135526935342852D+03 0.127813908213224D+03 0.954918231392248D+02 0.728739815384002D+02 0.568510168187687D+02 0.451958937452025D+02 0.365217328939967D+02 0.299339592752662D+02 0.248380488675846D+02 0.208286948482272D+02 0.176234796618732D+02 0.150218459641369D+02 0.128789658929967D+02 0.110886685909008D+02 0.957203534770936D+01 0.826963225851896D+01 0.713613002534860D+01 0.613652074106692D+01 0.524342068586227D+01 0.443512189607712D+01 0.369416587943849D+01 0.300628471143743D+01 0.235960222723657D+01 0.174401980672628D+01 0.115073270409802D+01 0.571837378495746D+00 0.000000000000000D+00 SHAR_EOF fi # end of overwriting check if test -f 'res5_2' then echo shar: will not over-write existing file "'res5_2'" else cat << "SHAR_EOF" > 'res5_2' DNSPLIN1 Output Domain: T(1) = 0.000D+00, T(N) = 0.100D+01 Number of data points: N = 11 Number of grid points: M = 251 Mesh width: H = 0.400000D-02 # CG steps between restarts: MAXCG = 3 Line search tolerance: FMTOL = 1.000D-06 Convergence tolerance: PHTOL = 1.000D-03 Max number of iterations: NGMAX = 200 Iteration 1 (Steepest descent) Functional: phi(F) = 3.226669631958785D+02 Mean absolute L2-gradient: GNRM1 = 3.63D+02 Max-norm of L2-gradient: GNRMM = 2.45D+04 Line search: No. phi evals NPHV = 42 Optimal step-size S = 1.453D+02 Functional phi(Y) = 1.142444537470714D+02 Relative change in phi(Y) DPHI = 6.44D-01 Squared relative change in Y: DY = 1.61D-03 Cubed S-gradient rel. to Y: DG = 2.11D-11 _________________________________________________________________ Iteration 2 (Conjugate gradient) Functional: phi(F) = 1.142444537470714D+02 Mean absolute L2-gradient: GNRM1 = 1.34D+02 Max-norm of L2-gradient: GNRMM = 4.24D+03 Line search: No. phi evals NPHV = 40 Optimal step-size S = 3.446D+01 Functional phi(Y) = 1.103124983940659D+02 Relative change in phi(Y) DPHI = 3.41D-02 Squared relative change in Y: DY = 5.97D-05 Cubed S-gradient rel. to Y: DG = 1.40D-11 _________________________________________________________________ Iteration 3 (Conjugate gradient) Functional: phi(F) = 1.103124983940659D+02 Mean absolute L2-gradient: GNRM1 = 1.51D+02 Max-norm of L2-gradient: GNRMM = 4.05D+03 Line search: No. phi evals NPHV = 38 Optimal step-size S = 1.064D+02 Functional phi(Y) = 9.275145093428233D+01 Relative change in phi(Y) DPHI = 1.58D-01 Squared relative change in Y: DY = 1.85D-03 Cubed S-gradient rel. to Y: DG = 3.65D-11 _________________________________________________________________ Iteration 4 (Conjugate gradient) Functional: phi(F) = 9.275145093428233D+01 Mean absolute L2-gradient: GNRM1 = 9.03D+01 Max-norm of L2-gradient: GNRMM = 1.17D+03 Line search: No. phi evals NPHV = 40 Optimal step-size S = 1.103D+02 Functional phi(Y) = 8.543327504399396D+01 Relative change in phi(Y) DPHI = 7.81D-02 Squared relative change in Y: DY = 1.75D-05 Cubed S-gradient rel. to Y: DG = 1.04D-12 _________________________________________________________________ Iteration 5 (Steepest descent) Functional: phi(F) = 8.543327504399396D+01 Mean absolute L2-gradient: GNRM1 = 3.89D+01 Max-norm of L2-gradient: GNRMM = 7.52D+02 Line search: No. phi evals NPHV = 43 Optimal step-size S = 2.857D+02 Functional phi(Y) = 7.491685718459338D+01 Relative change in phi(Y) DPHI = 1.22D-01 Squared relative change in Y: DY = 1.93D-03 Cubed S-gradient rel. to Y: DG = 3.63D-12 _________________________________________________________________ Iteration 6 (Conjugate gradient) Functional: phi(F) = 7.491685718459338D+01 Mean absolute L2-gradient: GNRM1 = 4.62D+01 Max-norm of L2-gradient: GNRMM = 9.69D+02 Line search: No. phi evals NPHV = 44 Optimal step-size S = 1.972D+02 Functional phi(Y) = 7.144463993956479D+01 Relative change in phi(Y) DPHI = 4.57D-02 Squared relative change in Y: DY = 4.08D-05 Cubed S-gradient rel. to Y: DG = 3.28D-14 _________________________________________________________________ Iteration 7 (Conjugate gradient) Functional: phi(F) = 7.144463993956479D+01 Mean absolute L2-gradient: GNRM1 = 2.58D+01 Max-norm of L2-gradient: GNRMM = 5.39D+02 Line search: No. phi evals NPHV = 33 Optimal step-size S = 4.411D+00 Functional phi(Y) = 7.139845536224045D+01 Relative change in phi(Y) DPHI = 6.38D-04 Squared relative change in Y: DY = 8.90D-07 Cubed S-gradient rel. to Y: DG = 1.31D-12 _________________________________________________________________ Number of descent iterations: 7 Total number of phi evaluations in the line searches: 280 Total polygonal curve length: 0.264D+01 SHAR_EOF fi # end of overwriting check cd .. if test ! -d 'Src' then mkdir 'Src' fi cd 'Src' if test -f 'src.f' then echo shar: will not over-write existing file "'src.f'" else cat << "SHAR_EOF" > 'src.f' C C DNSPLIN1: Discrete Nonlinear Spline Interpolation C C 02/18/03 C C C Given a sequence of n data ordinates D1, D2, ..., Dn C associated with strictly increasing abscissae T1, T2, ..., C Tn, n >= 2, this program constructs a discrete approxima- C tion to a nonlinear interpolating spline function y: the C graph of y is a continuous curve with continuous tangent C and piecewise continuous curvature (with discontinuities C allowed only at the knots (Ti,Di)) such that y(Tj) = Dj C and y is a local minimum of the functional C C E(y) = I[ K**2 ds], C C where I[_] is the integral with respect to arc length s, C and K(s) denotes signed curvature. The natural boundary C conditions associated with minimizing E over nonlinear C interpolating splines imply continuous curvature at the C interior knots, K = 0 at the endpoints, and the Euler C equation C C K''(s) + 0.5*K**3 = 0 C C is satisfied in each open interval (Ti,Ti+1). C C The spline curve y models a thin beam (elastica) of C homogeneous material and uniform cross sectional area C with frictionlessly rotating sliders at the knots. E(y) C is proportional to the elastic strain energy. C C Reference: Michael A. Malcolm, "On the computation of C nonlinear spline functions", SIAM J. Numerical C Analysis, Vol. 14, No. 2, April 1977. C C C DISCRETIZATION: C C Using K(t) = y''(t)/[1+y'(t)**2]**(3/2) and s'(t) = C [1+y'(t)**2]**(1/2), we obtain C C E(y) = I[ y''(t)**2/[1+y'(t)**2]**(5/2) dt], C C where I[_] denotes the integral from T1 to Tn. The domain C [T1,Tn] is uniformly partitioned with constant mesh width C H, resulting in m grid points T1+(i-1)*H, i = 1,...,m with C corresponding function values y(i) = y(T1+(i-1)*H). The C data points are perturbed if necessary so that, for j = 1, C ...,n, Tj = T1+(i-1)*H for some integer i = IND(j), and C y(i) = y(IND(j)) = y(Tj) = Dj. C C We use central difference approximations to derivatives, C and approximate the integral by the composite trapezoidal C rule to obtain the discretized functional C C phi(y) = H*Sum[ D2y(i)*a(i) ], C C where C C D1y(i) = (y(i+1)-y(i-1))/(2*H), C C D2y(i) = (y(i+1)-2*y(i)+y(i-1))/H**2, C C a(i) = D2y(i)/[1+D1y(i)**2]**(5/2), C C and Sum[_] denotes the sum over i = 2 to m-1. C C Denote by S0 the set of m-vectors h such that h(i) = 0 C if i = IND(j) for j = 1 to n. This is the space of C perturbations for y, chosen to preserve the interpolation C conditions provided the initial estimate of y satisfies C the conditions. Let P0 denote the orthogonal projection C onto S0. P0 is applied by simply zeroing the appropriate C components. C C The components of the gradient are C C grad(phi)(i) = (2/H)*[a(i-1)-2*a(i)+a(i+1)-b(i-1)+b(i+1)], C C where C C b(i) = (5/4)*H*D1y(i)*D2y(i)*a(i)/[1+D1y(i)**2], C C for i = 2 to m-1. grad(phi)(1) = grad(phi)(m) = 0 since C the endpoint values y(1) and y(m) are fixed by the inter- C polation conditions. The gradient is projected onto S0 by C zeroing the appropriate components. C C C METHOD: C C The functional phi is minimized subject to the interpo- C lation constraints by the Polak-Ribiere nonlinear conjugate C gradient method using the Sobolev gradient defined below. C C The Sobolev inner product associated with a curve (the C current approximation to the solution) y is C C _y = I[ g''(s)*h''(s) ds ], C C where s(t) is the arc length associated with y, and C C g'(s) = g'(t)/(1+y'(t)**2)**(1/2), C C g''(s) = [ (1+y'(t)**2)*g''(t) - C y'(t)*y''(t)*g'(t) ]/(1+y'(t)**2)**2. C C Note that _y is positive (defines an inner product) C on functions with two or more zeros (and square integrable C second derivatives). The discretized inner product C on S0 is C C _y = Sum[ Dg(i)*Dh(i) ], C C where the sum is over i = 2 to m-1, and Dg is the dis- C cretization of C C g''(s)*Sqrt(s') = [s'(t)*g''(t)-s''(t)*g'(t)]/ C [s'(t)**(5/2)] C C = [ [1+y'(t)**2]*g''(t)-y'(t)*y''(t)*g'(t) ]/ C [ [1+y'(t)**2]**(7/4) ]. C C Denote the discretized L2 inner product by C C _(m-2) = Sum[ r(i)*s(i) ]. C C with the sum over i = 2 to m-1. C C Then _y = _(m-2) = _m = C _m = _S0, where P0 is the C orthogonal projection onto S0 (and the adjoint of D is C P0*D**T). Now let g be the Sobolev gradient (S-gradient) C of phi at y. Then by the Rietz Representation Theorem, C C phi'(y)h = _S0 = _y C = _S0 C C for all h in S0, so that the Sobolev gradient g is defined C by C C DTD*g = grad(phi), C C where DTD is the restriction of P0*D**T*D to S0. C C Note that D**T*D is a pentadiagonal symmetric positive C semi-definite matrix of order m, but we implicitly omit C the rows and columns associated with constraints (zeros in C grad(phi)) to obtain a positive definite matrix of order C m-n. More precisely, we omit the first and last rows and C columns, and treat the other constraints by zeroing the C row and column elements other than the diagonal (which is C retained in order to preserve the scaling and condition C number). The resulting order-(m-2) system is solved by a C direct method (using a U**T*U factorization for upper C triangular matrix U). DTD may be thought of as a precon- C ditioner for the standard gradient. C C C REQUIRED LIBRARY: C C This program must be linked with a library providing the C LAPACK subroutine DPBSV and the double precision BLAS. SUBROUTINE CSPLIN (LDA,N,T,D, ABD, S,IER) INTEGER LDA, N, IER DOUBLE PRECISION T(N), D(N), ABD(LDA,N), S(N) C C*********************************************************** C C From DNSPLIN1 C Robert J. Renka C Dept. of Computer Science C Univ. of North Texas C renka@cs.unt.edu C 08/17/01 C C Given a sequence of N data points (T(i),D(i)) with C strictly increasing abscissae, this routine solves the C symmetric positive definite tridiagonal linear system for C the knot-derivative values S(i) defining the C2 Hermite C cubic spline interpolant with natural end conditions. C C On input: C C LDA = Row dimension of ABD. LDA >= 2. C C N = Number of data points. N >= 2. C C T,D = Arrays of length N containing the data points C (abscissae and ordinates, respectively, of the C knots) with strictly increasing abscissae. T C is not tested for validity. C C The above parameters are not altered by this routine. C C ABD = Array dimensioned LDA by M for M >= N. C C S = Array of length at least N. C C On output: C C ABD = Garbage. C C S = Knot-derivative values of the cubic spline if C IER = 0. C C IER = Error indicator: C IER = 0 if no errors were encountered. C IER = 1 if LDA or N is outside its valid C range. C C Modules required by CSPLIN: None C C*********************************************************** C DOUBLE PRECISION A1, A2, DD1, DD2 INTEGER J C C Test for valid input parameters. C IF (LDA .LT. 2 .OR. N .LT. 2) GO TO 11 C C Store the symmetric tridiagonal matrix in ABD and right C hand side in S. The first row of ABD contains the off- C diagonal elements 1/h(i) = 1/(T(i+1)-T(i)) in column C i+1 for i = 1 to N-1. The second row contains the C diagonal elements 2/h(i-1) + 2/h(i) in column i for C i = 1 to N, where 2/h(0) = 2/h(N) = 0. The right hand C side is S(i) = 3*[dd(i-1)/h(i-1) + dd(i)/h(i)], where C dd(i) = (D(i+1)-D(i))/h(i) and dd(0) = dd(N) = 0. C A2 = 1.D0/(T(2)-T(1)) DD2 = (D(2)-D(1))*A2*A2 ABD(2,1) = 2.D0*A2 S(1) = 3.D0*DD2 DO 1 J = 2,N-1 A1 = A2 A2 = 1.D0/(T(J+1)-T(J)) DD1 = DD2 DD2 = (D(J+1)-D(J))*A2*A2 ABD(1,J) = A1 ABD(2,J) = 2.D0*(A1+A2) S(J) = 3.D0*(DD1+DD2) 1 CONTINUE ABD(1,N) = A2 ABD(2,N) = 2.D0*A2 S(N) = 3.D0*DD2 C C Forward elimination: C DO 2 J = 2,N A1 = ABD(1,J)/ABD(2,J-1) ABD(2,J) = ABD(2,J) - A1*ABD(1,J) S(J) = S(J) - A1*S(J-1) 2 CONTINUE C C Back solve: C S(N) = S(N)/ABD(2,N) DO 3 J = N-1,1,-1 S(J) = (S(J) - ABD(1,J+1)*S(J+1))/ABD(2,J) 3 CONTINUE C C No error encountered. C IER = 0 RETURN C C Invalid input parameter. C 11 IER = 1 RETURN END DOUBLE PRECISION FUNCTION DSTORE (X) DOUBLE PRECISION X C C*********************************************************** C C From GLRH2 C Robert J. Renka C Dept. of Computer Science C Univ. of North Texas C renka@cs.unt.edu C 02/25/96 C C This function forces its argument X to be stored in a C memory location, thus providing a means of determining C floating point number characteristics (such as the machine C precision) when it is necessary to avoid computation in C high precision registers. C C On input: C C X = Double precision value to be stored. C C X is not altered by this function. C C On output: C C DSTORE = Value of X after it has been stored and C possibly truncated or rounded to the double C precision word length. C C Modules required by DSTORE: None C C*********************************************************** C DOUBLE PRECISION Y COMMON/STCOM/Y Y = X DSTORE = Y RETURN END DOUBLE PRECISION FUNCTION FMIN (AX,BX,TOL,F, IFLG ) DOUBLE PRECISION AX, BX, TOL, F INTEGER IFLG C C*********************************************************** C C From GLRH C Robert J. Renka C Dept. of Computer Science C Univ. of North Texas C renka@cs.unt.edu C 11/23/95 C C This function returns an approximation to the point at C which a real-valued function F attains a minimum on the C interval (AX,BX). It is based on the function by the same C name by R. Brent (01/01/73), modified to use reverse C communication. C C The method used is a combination of golden section C search and successive parabolic interpolation. Conver- C gence is never much slower than that for a Fibonacci C search. If F has a continuous second derivative which is C positive at the minimum (which is not at AX or BX), then C convergence is superlinear, and usually of the order of C about 1.324.... C C The function F is never evaluated at two points closer C together than EPS*Abs(FMIN) + (TOL/3), where EPS is C approximately the square root of the relative machine C precision. If F is a unimodal function and the computed C values of F are always unimodal when separated by at least C EPS*Abs(X*) + (TOL/3), then FMIN approximates the abscissa C of the global minimum of F on the interval (AX,BX) with C an error less than 3*EPS*Abs(FMIN) + TOL. If F is not C unimodal, then FMIN may approximate a local, but perhaps C non-global, minimum to the same accuracy. C C On input: C C AX,BX = Endpoints of the initial interval -- the C interval over which F is to be minimized. C C TOL = Desired length of the interval of uncertainty C of the final result. TOL .GE. 0. C C F = Function value F(FMIN) if IFLG .NE. 0, or unused C dummy parameter on the first call. C C The above parameters are not altered by this function. C C IFLG = Reverse communication flag: C IFLG = 0 if this is the first call to FMIN C for a given minimization problem. C IFLG > 0 if F contains a function value C at the point FMIN returned by the C previously call. The value of C IFLG must be the value returned C by the previous call. C C On Output: C C IFLG = Reverse communication flag: C IFLG = 0 if FMIN is the solution. C IFLG > 0 if FMIN contains a point at which C F is to be evaluated. FMIN must C be called again. C IFLG < 0 if FMIN was called with an invalid C value of IFLG (neither 0 nor the C returned value). C C FMIN = Approximation to the point at which F is C minimized (IFLG = 0), or point at which F C is to be evaluated (IFLG > 0). C C Module required by FMIN: DSTORE C C Intrinsic functions called by FMIN: ABS, SIGN, SQRT C C Reference: Richard Brent, Algorithms for Minimization C Without Derivatives, Prentice-Hall, Inc. C (1973). C C*********************************************************** C DOUBLE PRECISION A, B, C, D, E, FU, FV, FW, FX, EPS, . P, Q, R, TOL1, TOL2, U, V, W, X, XM DOUBLE PRECISION DSTORE SAVE C C Test IFLG. C IF (IFLG .EQ. 1) GO TO 2 IF (IFLG .EQ. 2) GO TO 6 IF (IFLG .NE. 0) THEN IFLG = -ABS(IFLG) RETURN ENDIF C C C is the squared inverse of the golden ratio. C C = 0.5D0*(3.D0 - SQRT(5.D0)) C C EPS is approximately the square root of the relative C machine precision. C EPS = 1.D0 1 EPS = EPS/2.D0 TOL1 = DSTORE(1.D0 + EPS) IF (TOL1 .GT. 1.D0) GO TO 1 EPS = SQRT(EPS) C C Initialization: C A = AX B = BX V = A + C*(B - A) W = V X = V E = 0.D0 C C Get F(X): IFLG = 1. C IFLG = 1 FMIN = X RETURN 2 FX = F FV = FX FW = FX C C Main loop: C 3 XM = 0.5D0*(A + B) TOL1 = EPS*ABS(X) + TOL/3.D0 TOL2 = 2.D0*TOL1 C C Test for termination. C IF (ABS(X - XM) .LE. (TOL2 - 0.5D0*(B - A))) . GO TO 7 C C Test for golden-section necessary. C IF (ABS(E) .LE. TOL1) GO TO 4 C C Fit a parabola. C R = (X - W)*(FX - FV) Q = (X - V)*(FX - FW) P = (X - V)*Q - (X - W)*R Q = 2.D0*(Q - R) IF (Q .GT. 0.D0) P = -P Q = ABS(Q) R = E E = D C C Test for parabola acceptable. C IF ( ABS(P) .GE. ABS(0.5D0*Q*R) .OR. . P .LE. Q*(A - X) .OR. P .GE. Q*(B - X) ) . GO TO 4 C C Take a parabolic interpolation step. C D = P/Q U = X + D C C F must not be evaluated too close to AX or BX. C IF ((U - A) .LT. TOL2) D = SIGN(TOL1, XM - X) IF ((B - U) .LT. TOL2) D = SIGN(TOL1, XM - X) GO TO 5 C C Take a golden-section step. C 4 IF (X .GE. XM) E = A - X IF (X .LT. XM) E = B - X D = C*E C C F must not be evaluated too close to X. C 5 IF (ABS(D) .GE. TOL1) THEN U = X + D ELSE U = X + SIGN(TOL1, D) ENDIF C C Get F(U). IFLG = 2. C IFLG = 2 FMIN = U RETURN 6 FU = F C C Update A, B, V, W, and X. C IF (FU .LE. FX) THEN IF (U .GE. X) A = X IF (U .LT. X) B = X V = W FV = FW W = X FW = FX X = U FX = FU GO TO 3 ENDIF C IF (U .LT. X) THEN A = U ELSE B = U ENDIF IF (FU .LE. FW .OR. W .EQ. X) THEN V = W FV = FW W = U FW = FU GO TO 3 ENDIF IF (FU .LE. FV .OR. V .EQ. X .OR. V .EQ. W) THEN V = U FV = FU ENDIF GO TO 3 C C Return the solution. C 7 IFLG = 0 FMIN = X RETURN END SUBROUTINE GRADL2 (N,H,IND,M,D1Y,D2Y,A, WK, G,GNRM1, . GNRMM,IER) INTEGER N, IND(N), M, IER DOUBLE PRECISION H, D1Y(M), D2Y(M), A(M), WK(M), G(M), . GNRM1, GNRMM C C*********************************************************** C C From DNSPLIN1 C Robert J. Renka C Dept. of Computer Science C Univ. of North Texas C renka@cs.unt.edu C 06/18/02 C C This subroutine computes the L2 gradient grad(phi) of C the energy functional phi associated with a nonlinear C spline interpolant (Function PHI). C C On input: C C N = Number of data points. 2 <= N <= M-1. C C H = Mesh width. H > 0. C C IND = Array of length N containing a strictly C increasing sequence of indexes (1 to M) of C the data values to be interpolated, with C IND(1) = 1 and IND(N) = M. C C M = Number of grid points. M = IND(N) >= 6. C C D1Y,D2Y,A = Arrays of length M containing difference C approximations to derivatives and terms C defining phi(y) computed by Function C PHI. C C The above parameters are not altered by this routine. C C WK = Work array of length at least M. C C G = Array of length at least M. C C On output: C C WK = Garbage. C C G = Components of the L2-gradient grad(phi) (partial C derivatives of phi with respect to the function C values Y(i)) unless IER > 0. G is an element of C S0: G(i) = 0 for i = IND(j), j = 1 to N. C C GNRM1 = Vector 1-norm of grad(phi): sum of absolute C values of the components. C C GNRMM = Vector max-norm of grad(phi): maximum of C the absolute values of the components. C C IER = Error indicator: C IER = 0 if no errors were encountered. C IER = 1 if N, H, IND, or M is outside its C valid range on input. Output para- C meters are not altered in this case. C C Modules required by GRADL2: None C C Intrinsic functions called by GRADL2: ABS, MAX C C*********************************************************** C DOUBLE PRECISION C1, C2, GMAX, SUM INTEGER I, J C C Test for invalid input parameters. C IF (N .LT. 2 .OR. H .LE. 0.D0 .OR. M .LT. 6 .OR. . M-N .LT. 1 .OR. IND(1) .NE. 1 .OR. . IND(N) .NE. M) GO TO 11 DO 1 I = 2,N IF (IND(I) .LE. IND(I-1)) GO TO 11 1 CONTINUE C C Store constants. C C1 = 1.25D0*H C2 = 2.D0/H C C L2 gradient: G(i) = (2/H)*[a(i-1)-2*a(i)+a(i+1) C -b(i-1)+b(i+1)] C C where a(i) = D2y(i)/[1+D1y(i)**2]**(5/2), C C b(i) = (5/4)*H*D1y(i)*D2y(i)**2/ C [1+D1y(i)**2]**(7/2), C C for i = 2 to m-1. C C Store b(i) in WK. C DO 2 I = 1,M WK(I) = C1*D1Y(I)*D2Y(I)*A(I)/(1.D0+D1Y(I)**2) 2 CONTINUE C C Store grad(phi) in G. C DO 3 I = 2,M-1 G(I) = C2*(A(I-1)-2.D0*A(I)+A(I+1)-WK(I-1)+WK(I+1)) 3 CONTINUE C C Project G onto S0 by zeroing the components associated C with data points. C DO 4 J = 1,N I = IND(J) G(I) = 0.D0 4 CONTINUE C C Accumulate GNRM1 and GNRMM in SUM and GMAX, respectively. C SUM = 0.D0 GMAX = 0.D0 DO 5 I = 2,M-1 SUM = SUM + ABS(G(I)) GMAX = MAX( GMAX,ABS(G(I)) ) 5 CONTINUE GNRM1 = SUM GNRMM = GMAX C C No errors encountered. C IER = 0 RETURN C C Invalid input parameter. C 11 IER = 1 RETURN END SUBROUTINE GRADS4 (N,H,IND,M,D1Y,D2Y,LDA, ABD,G, . WK, IER) INTEGER N, IND(N), M, LDA, IER DOUBLE PRECISION H, D1Y(M), D2Y(M), ABD(LDA,M), G(M), . WK(M,3) C C*********************************************************** C C From DNSPLIN1 C Robert J. Renka C Dept. of Computer Science C Univ. of North Texas C renka@cs.unt.edu C 07/12/02 C C This subroutine applies a 4-th order smoother DTD**(-1) C to the L2 gradient grad(phi), returning a Sobolev gradi- C ent G of the functional phi associated with a nonlinear C spline interpolant (Function PHI). The linear system is C solved by LAPACK Subroutine DPBSV. C C DTD is the restriction to S0 of P0*D**T*D, where D is C the discrete differential operator corresponding to Dg = C g''(s)*Sqrt(s'). The Sobolev gradient is therefore the C gradient associated with the following discretized inner C product on S0: C C _y = _(m-2), C C = Sum[ Dg(i)*Dh(i) ], C C where the sum is over i = 2 to m-1. This is the discrete C analog of C C _y = I[ g''(s)*h''(s) ds ], C C where s(t) is the arc length associated with y, and C C g'(s) = g'(t)/(1+y'(t)**2)**(1/2), C C g''(s) = [ (1+y'(t)**2)*g''(t) - C y'(t)*y''(t)*g'(t) ]/(1+y'(t)**2)**2. C C On input: C C N = Number of data points. 2 <= N <= M-1. C C H = Mesh width. H > 0. C C IND = Array of length N containing a strictly C increasing sequence of indexes (1 to M) of C the data values to be interpolated, with C IND(1) = 1 and IND(N) = M. C C M = Number of grid points. M = IND(N) >= 6. C C D1Y,D2Y = Arrays of length M containing difference C approximations to derivatives defining C phi(y) (computed by Function PHI). C C LDA = Row dimension of ABD. LDA >= 3. C C The above parameters are not altered by this routine. C C ABD = Array dimensioned LDA by M used to store the C symmetric positive semi-definite pentadiagonal C order-(M-2) matrix D**T*D. C C G = Array of length M containing the components of C the L2-gradient grad(phi) (partial derivatives C of phi with respect to the function values C Y(i)). G must be an element of S0: G(i) = 0 C for i = IND(j), j = 1 to N. G may be computed C by Subroutine GRADL2. C C WK = Work array of length at least 3*M. C C On output: C C ABD = U**T*U factorization of the upper triangle C of D**T*D in LAPACK band storage format C (incomplete if IER = 2). C C G = Sobolev gradient (an element of S0) unless C IER > 0, in which case G is not altered. C C WK = Garbage. C C IER = Error indicator: C IER = 0 if no errors were encountered. C IER = 1 if N, H, IND, M, or LDA is outside C its valid range on input. Output C parameters are not altered in this C case. C IER = 2 if DTD is not positive definite C (singular to working precision). C C LAPACK subprograms required by GRADS4: DPBSV, DPBTF2, C DPBTRF, DPBTRS, DPOTF2, LSAME, XERBLA C C BLAS subprograms required by GRADS4: DGEMM, DGEMV, DSYR, C DSYRK, DTBSV, DTRSM C C Intrinsic function called by GRADS4: SQRT C C*********************************************************** C DOUBLE PRECISION H4, T1, T2 INTEGER I, J C C Test for invalid input parameters. C IF (N .LT. 2 .OR. H .LE. 0.D0 .OR. M .LT. 6 .OR. . M-N .LT. 1 .OR. IND(1) .NE. 1 .OR. . IND(N) .NE. M .OR. LDA .LT. 3) GO TO 11 DO 1 I = 2,N IF (IND(I) .LE. IND(I-1)) GO TO 11 1 CONTINUE C C Compute terms defining D**T*D, where D is the second C derivative with respect to arc length scaled by C Sqrt(s')): C C H4 = H**4 C C T1 = 1 + D1y(j)**2 C T2 = 1/(H**4*(1+D1y(j)**2)**(7/2)) = 1/(H4*T1**3.5) C C WK(j,1) = T1**2*T2 C WK(j,2) = -H*T1*D1y(j)*D2y(j)*T2 C WK(j,3) = (H*D1y(j)*D2y(j)/2)**2*T2 C H4 = H**4 DO 2 J = 2,M-1 T1 = 1.D0 + D1Y(J)*D1Y(J) T2 = 1.D0/(H4*T1**3.5D0) WK(J,1) = T1*T1*T2 WK(J,2) = -H*T1*D1Y(J)*D2Y(J)*T2 WK(J,3) = (H*D1Y(J)*D2Y(J)/2.D0)**2*T2 2 CONTINUE C C Store the upper triangle of D**T*D in the first three rows C of ABD in LAPACK band storage format: C C ABD(1,j+1) = (D**T*D)(j,j+2) for j = 2 to m-3, C ABD(2,j) = (D**T*D)(j,j+1) for j = 2 to m-2, C ABD(3,j-1) = (D**T*D)(j,j) for j = 2 to m-1. C DO 3 J = 2,M-3 ABD(1,J+1) = WK(J+1,1)-WK(J+1,3) 3 CONTINUE C DO 4 J = 2,M-2 ABD(2,J) = -2.D0*WK(J,1)-WK(J,2)-2.D0*WK(J+1,1)+ . WK(J+1,2) 4 CONTINUE C ABD(3,1) = 4.D0*WK(2,1)+WK(3,1)-WK(3,2)+WK(3,3) DO 5 J = 3,M-2 ABD(3,J-1) = WK(J-1,1)+WK(J-1,2)+WK(J-1,3)+ . 4.D0*WK(J,1)+WK(J+1,1)-WK(J+1,2)+ . WK(J+1,3) 5 CONTINUE ABD(3,M-2) = WK(M-2,1)+WK(M-2,2)+WK(M-2,3)+ . 4.D0*WK(M-1,1) C C Convert D**T*D to DTD as follows: the rows and columns C associated with a data point (zero element in G) are C zeroed except for the diagonal element which is retained C in order to preserve the scaling (and condition number). C DO 6 J = 2,N-1 I = IND(J) ABD(1,I-1) = 0.D0 ABD(2,I-1) = 0.D0 ABD(2,I) = 0.D0 ABD(1,I+1) = 0.D0 6 CONTINUE C C Overwrite ABD with a U**T*U factorization (for upper C triangular matrix U) stored in band format, and solve C the system. C CALL DPBSV ('U',M-2,2,1,ABD,LDA,G(2),M-2,IER) IF (IER .NE. 0) THEN IER = 2 ENDIF RETURN C C Invalid input parameter. C 11 IER = 1 RETURN END SUBROUTINE LNSRCH (M,H,Y0,PHI0,P,FMTOL,OPT, S,Y,D1Y, . D2Y,A, PHIY,NEVAL,YMAX,DY,IER) INTEGER M, NEVAL, IER LOGICAL OPT DOUBLE PRECISION H, Y0(M), PHI0, P(M), FMTOL, S, Y(M), . D1Y(M), D2Y(M), A(M), PHIY, YMAX, DY C C*********************************************************** C C From DNSPLIN1 C Robert J. Renka C Dept. of Computer Science C Univ. of North Texas C renka@cs.unt.edu C 06/18/02 C C This subroutine minimizes phi(Y0+S*P) over positive C step-sizes S (unless OPT = FALSE), where phi is the C functional defined by Function PHI. C C On input: C C M = Number of grid points. M >= 2. C C H = Mesh width. H > 0. C C Y0 = Array of length M containing the current C estimate of the minimizer of phi: gridpoint C function values y(i). C C PHI0 = phi(Y0). C C P = Array of length M defining the search C direction for the descent method. C C FMTOL = Nonnegative tolerance for Function FMIN: C the desired length of the interval of C uncertainty for the optimal step-size. C C OPT = Flag with value TRUE iff the optimal step- C size is to be computed. C C The above parameters are not altered by this routine. C C S = Step-size to be used if OPT = FALSE, or initial C estimate of the optimal step-size if OPT = TRUE. C The value S = 1 or the output from a previous C call is a reasonable choice for the initial C estimate. S > 0. C C Y = Array of length M. C C D1Y,D2Y,A = Arrays of length at least M. C C On output: C C S = Estimate of the optimal step-size (not altered C if OPT = FALSE). C C Y = Minimizer of phi: Y0 + S*P. C C D1Y,D2Y,A = Finite difference approximations to C derivatives and terms defining the C integrand associated with phi(Y). C C PHIY = phi(Y). C C NEVAL = Number of evaluations of phi. C C YMAX = Max-norm of Y. C C DY = Relative change in Y: Max-norm(Y-Y0)/(1+YMAX) C = S*Max-norm(P)/(1+YMAX). C C IER = Error indicator: C IER = 0 if no errors were encountered. C IER = 1 if M, H, FMTOL, or S is outside its C valid range on input. C IER = 2 if P = 0. C Output parameters are not altered if IER > 0. C C Modules required by LNSRCH: FMIN, PHI C C Intrinsic function called by LNSRCH: ABS C C*********************************************************** C DOUBLE PRECISION PH2, PHS, S1, S2 DOUBLE PRECISION FMIN, PHI INTEGER I, IFLG, NEV C C Test for invalid input. C IF (M .LT. 2 .OR. H .LE. 0.D0 .OR. . FMTOL .LT. 0.D0 .OR. S .LE. 0.D0) THEN NEVAL = 0 IER = 1 RETURN ENDIF C C Compute DY = Max-norm(P), and test for P = 0. C DY = 0.D0 DO 1 I = 1,M IF (ABS(P(I)) .GT. DY) DY = ABS(P(I)) 1 CONTINUE IF (DY .EQ. 0.D0) THEN NEVAL = 0 IER = 2 RETURN ENDIF NEV = 0 IF (.NOT. OPT) GO TO 6 C C Find a bracketing interval [S1,S2] = [0,S2] such that C phi(Y0+S2*P) > PHI0 = phi(Y0). S2 is initialized to C 2*S and doubled at each step as necessary. C S1 = 0.D0 S2 = S 2 S2 = 2.D0*S2 DO 3 I = 1,M Y(I) = Y0(I) + S2*P(I) 3 CONTINUE PH2 = PHI (M,H,Y, D1Y,D2Y,A) NEV = NEV + 1 IF (PH2 .LE. PHI0) GO TO 2 C C Compute the optimal step-size S. C IFLG = 0 PHS = 0.D0 4 S = FMIN (S1,S2,FMTOL,PHS, IFLG ) IF (IFLG .EQ. 0) GO TO 6 DO 5 I = 1,M Y(I) = Y0(I) + S*P(I) 5 CONTINUE PHS = PHI (M,H,Y, D1Y,D2Y,A) NEV = NEV + 1 GO TO 4 C C Update Y and compute the final value PHIY = phi(Y), YMAX, C and DY = Max-norm(Y-Y0)/(1+YMAX) for Y = Y0+S*P. C 6 YMAX = 0.D0 DO 7 I = 1,M Y(I) = Y0(I) + S*P(I) IF (ABS(Y(I)) .GT. YMAX) YMAX = ABS(Y(I)) 7 CONTINUE PHIY = PHI (M,H,Y, D1Y,D2Y,A) DY = S*DY/(1.D0+YMAX) NEVAL = NEV + 1 IER = 0 RETURN END DOUBLE PRECISION FUNCTION PHI (M,H,Y, D1Y,D2Y,A) INTEGER M DOUBLE PRECISION H, Y(M), D1Y(M), D2Y(M), A(M) C C*********************************************************** C C From DNSPLIN1 C Robert J. Renka C Dept. of Computer Science C Univ. of North Texas C renka@cs.unt.edu C 06/18/02 C C Given a discrete sequence of function values Y = y(1), C y(2), ..., y(M) on a uniform grid with mesh width H, this C function returns the value at Y of the discretized energy C functional which approximates the integral with respect to C arc length of squared curvature, along with the terms C defining the functional and difference approximations to C derivatives at the grid points: C C PHI = H*Sum[ D2y(i)*a(i) ], C C where C C D1y(i) = (y(i+1)-y(i-1))/(2*H), C C D2y(i) = (y(i+1)-2*y(i)+y(i-1))/H**2, C C a(i) = D2y(i)/[1+D1y(i)**2]**(5/2), C C and Sum[_] denotes the sum over i = 2 to m-1. The end C conditions give D2y(1) = D2y(m) = 0. C C On input: C C M = Number of grid points. M >= 2. C C H = Mesh width. H > 0. C C Y = Array of length M containing the function C values y(i). C C The above parameters are not altered by this function. C C D1Y,D2Y,A = Arrays of length at least M. C C On output: C C D1Y,D2Y,A = Arrays containing the finite difference C approximations defined above, along with C the endpoint values associated with C natural end conditions: D2y(1) = D2y(M) C = 0, and thus D1y(1) = (y(2)-y(1))/H and C D1y(M) = (y(M)-y(M-1))/H. C C PHI = Value of the discretized energy functional. C C The program is terminated with an error message written to C the standard output unit if an input parameter is invalid. C C Modules required by PHI: None C C Intrinsic function called by PHI: SQRT C C*********************************************************** C DOUBLE PRECISION S1, S2, SUM, T INTEGER I IF (M .LT. 2 .OR. H .LE. 0.D0) GO TO 11 C C Initialization: C S1 = 1.D0/(2.D0*H) S2 = 1.D0/(H*H) C C i = 1: the terms defining phi(Y) are accumulated in SUM. C D1Y(1) = (Y(2)-Y(1))/H D2Y(1) = 0.D0 A(1) = 0.D0 SUM = 0.D0 C C i = 2 to m-1: C DO 1 I = 2,M-1 D1Y(I) = (Y(I+1)-Y(I-1))*S1 D2Y(I) = (Y(I+1)-2.D0*Y(I)+Y(I-1))*S2 T = 1.D0 + D1Y(I)*D1Y(I) A(I) = D2Y(I)/(T*T*SQRT(T)) SUM = SUM + D2Y(I)*A(I) 1 CONTINUE C C i = m: C D1Y(M) = (Y(M)-Y(M-1))/H D2Y(M) = 0.D0 A(M) = 0.D0 C PHI = H*SUM RETURN C C M < 2 or H <= 0. C 11 WRITE (*,100) M, H 100 FORMAT (//' *** Error in PHI: M = ',I4,', H = ', . D10.3) STOP END SUBROUTINE PLTCRV (LUN,N,A,B,XS,YS,M,Y,PLT0,Y0, . PLTSIZ, IER) INTEGER LUN, N, M, IER LOGICAL PLT0 DOUBLE PRECISION A, B, XS(N), YS(N), Y(M), Y0(M), . PLTSIZ C C*********************************************************** C C From DNSPLIN1 C Robert J. Renka C Dept. of Computer Science C Univ. of North Texas C renka@cs.unt.edu C 06/20/02 C C Given one or two sequences of function values y(1), ..., C y(M), and optionally y0(1), ..., y0(M), associated with C uniformly distributed grid points T(i) = A + (i-1)*H for C H = (B-A)/(M-1), i = 1 to M, and a sequence of N data C points (xs(i),ys(i)), this subroutine creates a level-2 C Encapsulated PostScript (EPS) file containing a plot of C the curve (or curves) with marker symbols centered at the C data points. If the second curve y0 is included, it it C drawn with dashed lines. It is assumed that the data C points lie inside the containing rectangle of the curves. C C On input: C C LUN = Logical unit number in the range 0 to 99. C The unit should be opened with an appropriate C file name before the call to this routine. C C N = Number of data points to be marked. C 0 <= N <= M. C C A,B = Left and right endpoints defining the domain. C B-A > 0. C C XS,YS = Arrays of length N containing the abscissae C and ordinates of the data points to be C marked. C C M = Number of grid points and function values. C M >= 2. C C Y = Array of length M containing the function C values. C C PLT0 = Logical variable with value TRUE iff the C second curve is to be drawn. C C Y0 = Array of length M containing function values C defining the second curve if PLT0 = TRUE, or C dummy variable otherwise. C C PLTSIZ = Plot size in inches. The view volume C (bounding box defined by the function C domain and range) is mapped to a rectangu- C lar viewport with maximum side-length equal C to .88*PLTSIZ. The containing rectangle is C centered on the 8.5 by 11 inch page, and C its boundary is drawn. Labels below, to C the left of, and to the right of the rec- C tangle extend its dimensions by 1/4 inch, C 2/3 inches, and 1/6 inch, respectively, for C FSIZ = 12 pts. 1.0 <= PLTSIZ <= 6.5. C C Input parameters are not altered by this routine. C C On output: C C IER = Error indicator: C IER = 0 if no errors were encountered. C IER = 1 if LUN, N, A, B, M, or PLTSIZ is C outside its valid range. C IER = 2 if all function values are identical. C IER = 3 if an error was encountered in writing C to unit LUN. C C Various plotting options can be controlled by altering C the data statement below. C C Modules required by PLTCRV: None C C Intrinsic functions called by PLTCRV: CHAR, MAX, MIN, C NINT, REAL C C*********************************************************** C INTEGER I, IH, IPX1, IPX2, IPY1, IPY2, IW LOGICAL ASPECT, AXES, SQUARE REAL BSIZ, DASHL, DX, DY, FSIZ, H, R, SFX, SFY, . T, TX, TY, WX1, WX2, WY1, WY2, X, XM, YM C DATA ASPECT/.TRUE./, AXES/.TRUE./, BSIZ/6.0/, . DASHL/4.0/, FSIZ/12.0/, SQUARE/.FALSE./ C C Local parameters: C C ASPECT = Logical variable with value TRUE if the C aspect ratio of the view volume is to be C preserved in the viewport, FALSE if the C viewport is to be square. Note the limit- C ation on the size of the aspect ratio R C AXES = Logical variable with value TRUE if the x and C y axes (intersected with the view volume) C are to be drawn C BSIZ = Box size in points for marker symbols C DASHL = Length (in points, at 72 points per inch) of C dashes and spaces in a dashed line pattern C used for connecting pseudo-vertices C DX = View volume width WX2-WX1 C DY = View volume height WY2-WY1 C FSIZ = Font size in points for labels C H = Mesh width C I = Array index C IH = Height of the viewport in points C IPX1,IPY1 = X and y coordinates (in points) of the lower C left corner of the containing rectangle C IPX2,IPY2 = X and y coordinates (in points) of the upper C right corner of the containing rectangle C IW = Width of the viewport in points C R = Aspect ratio of the viewport: C Max(1/2,Min(2,DX/DY)) if ASPECT = TRUE, C 1 otherwise C SFX,SFY = Scale factors for mapping world coordinates C (window coordinates in [WX1,WX2] X [WY1,WY2]) C to viewport coordinates C SQUARE = Logical variable with value TRUE if markers C are to be square boxes, FALSE if markers are C to be X's C T = Temporary variable C TX,TY = Translation vector for mapping world coordi- C nates to viewport coordinates C WX1,WY1 = X and y (world) coordinates of the lower left C corner of the window (view volume) C WX2,WY2 = X and y (world) coordinates of the upper right C corner of the window (view volume) C X = Grid point abscissae value C XM,YM = Location in world coordinates of the center of C a marker symbol or beginning of a label C C C Test for error 1. C IF (LUN .LT. 0 .OR. LUN .GT. 99 .OR. N .LT. 0 . .OR. N .GT. M .OR. B-A .LE. 0.0 .OR. M .LT. 2 . .OR. PLTSIZ .LT. 1.0 .OR. PLTSIZ .GT. 6.5D0) . GO TO 11 C C Compute the window (view volume) corner coordinates C (WX1,WY1) and WX2,WY2). C WX1 = A WX2 = B WY1 = REAL(Y(1)) WY2 = WY1 DO 1 I = 2,M WY1 = MIN(WY1,REAL(Y(I))) WY2 = MAX(WY2,REAL(Y(I))) 1 CONTINUE IF (PLT0) THEN DO 2 I = 1,M WY1 = MIN(WY1,REAL(Y0(I))) WY2 = MAX(WY2,REAL(Y0(I))) 2 CONTINUE ENDIF C C Compute the dimensions and aspect ratio of the view C volume. C DX = WX2 - WX1 DY = WY2 - WY1 IF (DY .LE. 0.0) GO TO 12 R = 1.0 IF (ASPECT) R = MAX(0.5,MIN(2.0,DX/DY)) C C Compute the lower left (IPX1,IPY1) and upper right C (IPX2,IPY2) corner coordinates of the containing C rectangle. The coordinates, specified in default user C space units (points, at 72 points/inch with origin at C the lower left corner of the page), are chosen to have C aspect ratio R, and to center the plot on the 8.5 by 11 C inch page. The center of the page is (306,396), and C T = PLTSIZ/2 in points. C T = 36.0*PLTSIZ IF (R .GE. 1.0) THEN IPX1 = 306 - NINT(T) IPX2 = 306 + NINT(T) IPY1 = 396 - NINT(T/R) IPY2 = 396 + NINT(T/R) ELSE IPX1 = 306 - NINT(T*R) IPX2 = 306 + NINT(T*R) IPY1 = 396 - NINT(T) IPY2 = 396 + NINT(T) ENDIF C C Output header comments. The bounding box corner coordi- C nates are obtained by extending the containing rectangle C to include its boundary and the labels. C WRITE (LUN,100,ERR=13) IPX1-NINT(4.0*FSIZ), . IPY1-NINT(1.5*FSIZ), . IPX2+NINT(FSIZ), IPY2+1 100 FORMAT ('%!PS-Adobe-3.0 EPSF-3.0'/ . '%%BoundingBox:',4I4/ . '%%Title: Nonlinear Spline'/ . '%%Creator: DNSPLIN1'/ . '%%EndComments') C C Set the line thickness to 2 points, and draw the boundary C of the containing rectangle. C T = 2.0 WRITE (LUN,110,ERR=13) T WRITE (LUN,120,ERR=13) IPX1, IPY1 WRITE (LUN,130,ERR=13) IPX1, IPY2 WRITE (LUN,130,ERR=13) IPX2, IPY2 WRITE (LUN,130,ERR=13) IPX2, IPY1 WRITE (LUN,140,ERR=13) WRITE (LUN,150,ERR=13) 110 FORMAT (F12.6,' setlinewidth') 120 FORMAT (2I4,' moveto') 130 FORMAT (2I4,' lineto') 140 FORMAT ('closepath') 150 FORMAT ('stroke') C C Set IW and IH to the width and height of a viewport C obtained by shrinking the containing rectangle by 12% C in each direction. C IW = NINT(0.88*REAL(IPX2-IPX1)) IH = NINT(0.88*REAL(IPY2-IPY1)) C C Set up a viewport mapping. C SFX = REAL(IW)/DX SFY = REAL(IH)/DY TX = REAL(306-IW/2) - SFX*WX1 TY = REAL(396-IH/2) - SFY*WY1 C C Set the line thickness to 1 point. C T = 1.0 WRITE (LUN,110,ERR=13) T C C Draw the first curve Y (by creating and painting a path). C H = DX/REAL(M-1) X = A WRITE (LUN,160,ERR=13) SFX*X+TX, SFY*REAL(Y(1))+TY DO 3 I = 2,M X = X + H WRITE (LUN,170,ERR=13) SFX*X+TX, SFY*REAL(Y(I))+TY 3 CONTINUE WRITE (LUN,150,ERR=13) 160 FORMAT (2F12.6,' moveto') 170 FORMAT (2F12.6,' lineto') IF (PLT0) THEN C C Set the dashed line attribute. C WRITE (LUN,180,ERR=13) DASHL, DASHL 180 FORMAT ('[',2F12.6,'] 0 setdash') C C Draw the second curve Y0. C X = A WRITE (LUN,160,ERR=13) SFX*X+TX, SFY*REAL(Y0(1))+TY DO 4 I = 2,M X = X + H WRITE (LUN,170,ERR=13) SFX*X+TX, SFY*REAL(Y0(I))+TY 4 CONTINUE WRITE (LUN,150,ERR=13) ENDIF C C Restore the solid line attribute. C WRITE (LUN,190,ERR=13) 190 FORMAT ('[] 0 setdash') IF (AXES) THEN C C Draw x and y axes (if contained in the view volume). C IF (WX1 .LT. 0.0 .AND. WX2 .GT. 0.0) THEN WRITE (LUN,160,ERR=13) TX, SFY*WY1+TY WRITE (LUN,170,ERR=13) TX, SFY*WY2+TY ENDIF IF (WY1 .LT. 0.0 .AND. WY2 .GT. 0.0) THEN WRITE (LUN,160,ERR=13) SFX*WX1+TX, TY WRITE (LUN,170,ERR=13) SFX*WX2+TX, TY ENDIF ENDIF C C Draw marker symbols (squares or X's) at the data points. C C T = BSIZ/2, C (XM,YM) = Location of symbol center. C T = BSIZ/2.0 DO 5 I = 1,N XM = SFX*REAL(XS(I))+TX YM = SFY*REAL(YS(I))+TY WRITE (LUN,160,ERR=13) XM-T, YM-T IF (SQUARE) THEN WRITE (LUN,170,ERR=13) XM+T, YM-T WRITE (LUN,170,ERR=13) XM+T, YM+T WRITE (LUN,170,ERR=13) XM-T, YM+T WRITE (LUN,140,ERR=13) ELSE WRITE (LUN,170,ERR=13) XM+T, YM+T WRITE (LUN,160,ERR=13) XM+T, YM-T WRITE (LUN,170,ERR=13) XM-T, YM+T ENDIF 5 CONTINUE C C Paint the path. C WRITE (LUN,150,ERR=13) C C Select a font and scale it. C T = FSIZ WRITE (LUN,200,ERR=13) T 200 FORMAT ('/Helvetica findfont'/ . F12.6,' scalefont setfont') C C Draw tick marks and labels at the extreme points of the C domain and range. The tick mark length is T/2. C XM = SFX*WX1+TX YM = REAL(IPY1) WRITE (LUN,160,ERR=13) XM, YM WRITE (LUN,170,ERR=13) XM, YM-T/2.0 XM = XM - 1.5*T YM = YM - 1.5*T WRITE (LUN,160,ERR=13) XM, YM WRITE (LUN,210,ERR=13) WX1 210 FORMAT ('(',F6.2,') show') C XM = SFX*WX2+TX YM = REAL(IPY1) WRITE (LUN,160,ERR=13) XM, YM WRITE (LUN,170,ERR=13) XM, YM-T/2.0 XM = XM - 1.5*T YM = YM - 1.5*T WRITE (LUN,160,ERR=13) XM, YM WRITE (LUN,210,ERR=13) WX2 C XM = REAL(IPX1) YM = SFY*WY1+TY WRITE (LUN,160,ERR=13) XM, YM WRITE (LUN,170,ERR=13) XM-T/2.0, YM XM = XM - 4.0*T YM = YM - 0.25*T WRITE (LUN,160,ERR=13) XM, YM WRITE (LUN,210,ERR=13) WY1 C XM = REAL(IPX1) YM = SFY*WY2+TY WRITE (LUN,160,ERR=13) XM, YM WRITE (LUN,170,ERR=13) XM-T/2.0, YM XM = XM - 4.0*T YM = YM - 0.25*T WRITE (LUN,160,ERR=13) XM, YM WRITE (LUN,210,ERR=13) WY2 C C Paint the path and output the showpage command and C end-of-file indicator. C WRITE (LUN,220,ERR=13) 220 FORMAT ('stroke'/ . 'showpage'/ . '%%EOF') C C HP's interpreters require a one-byte End-of-PostScript-Job C indicator (to eliminate a timeout error message): C ASCII 4. C WRITE (LUN,230,ERR=13) CHAR(4) 230 FORMAT (A1) C C No error encountered. C IER = 0 RETURN C C Invalid input parameter LUN, N, A, B, M, or PLTSIZ. C 11 IER = 1 RETURN C C DY = 0: constant function. C 12 IER = 2 RETURN C C Error writing to unit LUN. C 13 IER = 3 RETURN END SUBROUTINE READF (LIN,NMAX, N,T,D,H,IND,IER) INTEGER LIN, NMAX, N, IND(NMAX), IER DOUBLE PRECISION T(NMAX), D(NMAX), H C C*********************************************************** C C From DNSPLIN1 C Robert J. Renka C Dept. of Computer Science C Univ. of North Texas C renka@cs.unt.edu C 01/02/02 C C This routine reads a data set consisting of the number C of data points N, the abscissae T, ordinates D, and mesh C width H for the finite difference grid. The indexes IND C of the data points in the uniform grid are also computed. C Format I4 is used for N, format D22.15 for the other C values. C C On input: C C LIN = Logical unit number for input. 0 .LE. LIN C .LE. 99. C C NMAX = Maximum value of N. NMAX >= 2. C C The above parameters are not altered by this routine. C C T,D,IND = Arrays of length at least NMAX. C C On output: C C N = Number of data points. 2 <= N <= NMAX. C C T,D = Ordered sequence of data abscissae and ordi- C nates, respectively. The abscissae must be C strictly increasing with separation between C adjacent values greater than H/2. C C H = Positive mesh width for the uniform finite C difference grid. The local discretization error C is O(H**2), and the data abscissae are perturbed C if necessary so that T(i)-T(1) is a multiple of C H for i = 1 to N. C C IND = Indexes of the (perturbed) data points in the C grid: C IND(i) = NINT((T(i)-T(1))/H) + 1 C for i = 1 to N. C C IER = Error indicator: C IER = 0 if no errors were encountered. C IER = 1 if LIN or NMAX is outside its C valid range. C IER = 2 if a read error occurred. C IER = 3 if N < 2 or N > NMAX. C IER = 4 if H <= 0. C IER = 5 if the abscissae are not strictly C increasing or the separation between C adjacent abscissae is too small to C produce distinct indexes. C C The error conditions are tested in the above- C specified order, and processing is terminated C immediately on encountering an error. C C Modules required by READF: None C C Intrinsic functions called by READF: DBLE, NINT C C*********************************************************** C INTEGER I C C Input formats: C 100 FORMAT (I4) 110 FORMAT (D22.15) C C Test for invalid input parameters. C IF (LIN .LT. 0 .OR. LIN .GT. 99 .OR. NMAX .LT. 2) . GO TO 11 C C Read the data set and test for errors. C READ (LIN,100,ERR=12) N IF (N .LT. 2 .OR. N .GT. NMAX) GO TO 13 READ (LIN,110,ERR=12) (T(I), I = 1,N) READ (LIN,110,ERR=12) (D(I), I = 1,N) READ (LIN,110,ERR=12) H IF (H .LE. 0.D0) GO TO 14 C C Compute IND. C IND(1) = 1 DO 1 I = 2,N IND(I) = NINT((T(I)-T(1))/H) + 1 IF (IND(I) .LT. IND(I-1)) GO TO 15 T(I) = T(1) + DBLE(IND(I)-1)*H 1 CONTINUE C C No error encountered. C IER = 0 RETURN C C Input parameter LIN or NMAX is outside its valid range. C 11 IER = 1 RETURN C C Read error encountered. C 12 IER = 2 RETURN C C N < 2 or N > NMAX. C 13 IER = 3 RETURN C C H is not positive. C 14 IER = 4 RETURN C C Abscissae not strictly increasing or too close together. C 15 IER = 5 RETURN END SUBROUTINE WRITF (LOUT,M,Y,D1Y,D2Y) INTEGER LOUT, M DOUBLE PRECISION Y(M), D1Y(M), D2Y(M) C C*********************************************************** C C From DNSPLIN1 C Robert J. Renka C Dept. of Computer Science C Univ. of North Texas C renka@cs.unt.edu C 06/20/02 C C This routine creates an output data set consisting of C the number of grid points m (format I5) followed by the C sequence of gridpoint function values (y(i), i = 1,m), C the first derivative values (D1y(i), i = 1,m), and the C second derivative values (D2y(i), i = 1,m) written with C format D22.15. C C On input: C C LOUT = Logical unit number for writing the solution. C 0 .LE. LOUT .LE. 99. C C M = Number of grid points. M > 0. C C Y = Array of length M containing the function C values. C C D1Y,D2Y = Arrays of length M containing difference C approximations to derivatives defining C phi(y) (computed by Function PHI). C C Input parameters are not altered by this routine. C C An error message is written to the standard output unit C if an input parameter is invalid or a write error is C encountered writing to unit LOUT. C C Modules required by WRITF: None C C*********************************************************** C INTEGER I C C Output formats: C 100 FORMAT (I5) 110 FORMAT (D22.15) C C Test for invalid parameters. C IF (LOUT .LT. 0 .OR. LOUT .GT. 99 .OR. M .LE. 0) . GO TO 11 C C Create the data set. C WRITE (LOUT,100,ERR=12) M DO 1 I = 1,M WRITE (LOUT,110,ERR=12) Y(I) 1 CONTINUE DO 2 I = 1,M WRITE (LOUT,110,ERR=12) D1Y(I) 2 CONTINUE DO 3 I = 1,M WRITE (LOUT,110,ERR=12) D2Y(I) 3 CONTINUE RETURN C C Invalid input parameter. C 11 WRITE (*,210) 210 FORMAT (///10X,'*** Error in WRITF: invalid input ', . 'parameter ***') RETURN C C Error writing to unit LOUT. C 12 WRITE (*,220) 220 FORMAT (///10X,'*** Error in WRITF writing to unit ', . 'LOUT ***') RETURN END SHAR_EOF fi # end of overwriting check cd .. cd .. cd .. # End of shell archive exit 0