block matrix in the array WORK. (Or the subdiagonal, same array.) Before
commit, only the nonzero elements of WORK were initialized to their correct
nonzero values. The zero entries were not initialized and not referenced and
assumed to be zero in subsequent subroutines. This is fine, but I think a
better behavior for the subroutine is to initialize these zero entries to zero.
So the commit is initializing these entries to zero.
Also a (double precision) ZERO in the D routine should have been an (integer)
0.
Also fix some formatting to have C, D, and S consistent.
Note: the indentations, comments of the Z routine is not consistent with C, D and
S. I did not have time to fix this.
DO WHILE ( I .GT. 1 )
IF( IPIV(I) .LT. 0 ) THEN
WORK(I)=A(I-1,I)
+ WORK(I-1)=ZERO
A(I-1,I)=ZERO
I=I-1
ELSE
DO WHILE ( I .LE. N )
IF( I.LT.N .AND. IPIV(I) .LT. 0 ) THEN
WORK(I)=A(I+1,I)
+ WORK(I+1)=ZERO
A(I+1,I)=ZERO
I=I+1
ELSE
ENDIF
ELSE
IP=-IPIV(I)
- IF ( I .GT. 1 ) THEN
+ IF (I .GT. 1) THEN
DO 23 J= 1,I-1
TEMP=A(IP,J)
A(IP,J)=A(I+1,J)
DO WHILE ( I .GT. 1 )
IF( IPIV(I) .LT. 0 ) THEN
WORK(I)=A(I-1,I)
+ WORK(I-1)=ZERO
A(I-1,I)=ZERO
I=I-1
ELSE
DO WHILE ( I .LE. N )
IF( I.LT.N .AND. IPIV(I) .LT. 0 ) THEN
WORK(I)=A(I+1,I)
+ WORK(I+1)=ZERO
A(I+1,I)=ZERO
I=I+1
ELSE
*
I=1
DO WHILE ( I .LE. N-1 )
- IF( IPIV(I) .LT. ZERO ) THEN
+ IF( IPIV(I) .LT. 0 ) THEN
A(I+1,I)=WORK(I)
I=I+1
ENDIF
DO WHILE ( I .GT. 1 )
IF( IPIV(I) .LT. 0 ) THEN
WORK(I)=A(I-1,I)
+ WORK(I-1)=ZERO
A(I-1,I)=ZERO
I=I-1
ELSE
DO WHILE ( I .LE. N )
IF( I.LT.N .AND. IPIV(I) .LT. 0 ) THEN
WORK(I)=A(I+1,I)
+ WORK(I+1)=ZERO
A(I+1,I)=ZERO
I=I+1
ELSE
DO WHILE ( I .GT. 1 )
IF( IPIV(I) .LT. 0 ) THEN
WORK(I)=A(I-1,I)
+ WORK(I-1)=ZERO
A(I-1,I)=ZERO
I=I-1
ELSE
DO WHILE ( I .LE. N )
IF( I.LT.N .AND. IPIV(I) .LT. 0 ) THEN
WORK(I)=A(I+1,I)
+ WORK(I+1)=ZERO
A(I+1,I)=ZERO
I=I+1
ELSE