Skip to content

Commit

Permalink
Makes NaN an illegal value for ANORM on input of GECON. Let NaNs prop…
Browse files Browse the repository at this point in the history
…agate in the computation of RCOND
  • Loading branch information
weslleyspereira committed Nov 8, 2023
1 parent 09abbd0 commit 49bfa63
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 16 deletions.
9 changes: 5 additions & 4 deletions SRC/cgecon.f
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@
*> \verbatim
*> INFO is INTEGER
*> = 0: successful exit
*> < 0: if INFO = -i, the i-th argument had an illegal value
*> < 0: if INFO = -i, the i-th argument had an illegal value.
*> NaNs are illegal inputs for ANORM.
*> Infinity values are valid inputs for ANORM.
*> = 1: RCOND = NaN.
*> \endverbatim
*
Expand Down Expand Up @@ -201,7 +203,7 @@ SUBROUTINE CGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK,
RETURN
ELSE IF( SISNAN( ANORM ) ) THEN
RCOND = ANORM
INFO = 1
INFO = -6
RETURN
END IF
*
Expand Down Expand Up @@ -260,8 +262,7 @@ SUBROUTINE CGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK,
*
* Compute the estimate of the reciprocal condition number.
*
IF( AINVNM.NE.ZERO )
$ RCOND = ( ONE / AINVNM ) / ANORM
RCOND = ( ONE / AINVNM ) / ANORM
*
* Check for NaNs
*
Expand Down
9 changes: 5 additions & 4 deletions SRC/dgecon.f
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@
*> \verbatim
*> INFO is INTEGER
*> = 0: successful exit
*> < 0: if INFO = -i, the i-th argument had an illegal value
*> < 0: if INFO = -i, the i-th argument had an illegal value.
*> NaNs are illegal inputs for ANORM.
*> Infinity values are valid inputs for ANORM.
*> = 1: RCOND = NaN.
*> \endverbatim
*
Expand Down Expand Up @@ -194,7 +196,7 @@ SUBROUTINE DGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
RETURN
ELSE IF( DISNAN( ANORM ) ) THEN
RCOND = ANORM
INFO = 1
INFO = -6
RETURN
END IF
*
Expand Down Expand Up @@ -252,8 +254,7 @@ SUBROUTINE DGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
*
* Compute the estimate of the reciprocal condition number.
*
IF( AINVNM.NE.ZERO )
$ RCOND = ( ONE / AINVNM ) / ANORM
RCOND = ( ONE / AINVNM ) / ANORM
*
* Check for NaNs
*
Expand Down
9 changes: 5 additions & 4 deletions SRC/sgecon.f
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@
*> \verbatim
*> INFO is INTEGER
*> = 0: successful exit
*> < 0: if INFO = -i, the i-th argument had an illegal value
*> < 0: if INFO = -i, the i-th argument had an illegal value.
*> NaNs are illegal inputs for ANORM.
*> Infinity values are valid inputs for ANORM.
*> = 1: RCOND = NaN.
*> \endverbatim
*
Expand Down Expand Up @@ -194,7 +196,7 @@ SUBROUTINE SGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
RETURN
ELSE IF( SISNAN( ANORM ) ) THEN
RCOND = ANORM
INFO = 1
INFO = -6
RETURN
END IF
*
Expand Down Expand Up @@ -252,8 +254,7 @@ SUBROUTINE SGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, IWORK,
*
* Compute the estimate of the reciprocal condition number.
*
IF( AINVNM.NE.ZERO )
$ RCOND = ( ONE / AINVNM ) / ANORM
RCOND = ( ONE / AINVNM ) / ANORM
*
* Check for NaNs
*
Expand Down
9 changes: 5 additions & 4 deletions SRC/zgecon.f
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,9 @@
*> \verbatim
*> INFO is INTEGER
*> = 0: successful exit
*> < 0: if INFO = -i, the i-th argument had an illegal value
*> < 0: if INFO = -i, the i-th argument had an illegal value.
*> NaNs are illegal inputs for ANORM.
*> Infinity values are valid inputs for ANORM.
*> = 1: RCOND = NaN.
*> \endverbatim
*
Expand Down Expand Up @@ -201,7 +203,7 @@ SUBROUTINE ZGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK,
RETURN
ELSE IF( DISNAN( ANORM ) ) THEN
RCOND = ANORM
INFO = 1
INFO = -6
RETURN
END IF
*
Expand Down Expand Up @@ -260,8 +262,7 @@ SUBROUTINE ZGECON( NORM, N, A, LDA, ANORM, RCOND, WORK, RWORK,
*
* Compute the estimate of the reciprocal condition number.
*
IF( AINVNM.NE.ZERO )
$ RCOND = ( ONE / AINVNM ) / ANORM
RCOND = ( ONE / AINVNM ) / ANORM
*
* Check for NaNs
*
Expand Down

0 comments on commit 49bfa63

Please sign in to comment.