Fix possible division by zero in xTGSJA (Reference-LAPACK PR502)

This commit is contained in:
Martin Kroeker
2021-05-01 21:31:13 +02:00
committed by GitHub
parent 3a30c12019
commit de8656769c
4 changed files with 20 additions and 16 deletions

View File

@@ -400,7 +400,7 @@
* .. Parameters ..
INTEGER MAXIT
PARAMETER ( MAXIT = 40 )
REAL ZERO, ONE
REAL ZERO, ONE, HUGENUM
PARAMETER ( ZERO = 0.0E+0, ONE = 1.0E+0 )
* ..
* .. Local Scalars ..
@@ -419,7 +419,8 @@
$ SSCAL, XERBLA
* ..
* .. Intrinsic Functions ..
INTRINSIC ABS, MAX, MIN
INTRINSIC ABS, MAX, MIN, HUGE
PARAMETER ( HUGENUM = HUGE(ZERO) )
* ..
* .. Executable Statements ..
*
@@ -596,9 +597,9 @@
*
A1 = A( K+I, N-L+I )
B1 = B( I, N-L+I )
GAMMA = B1 / A1
*
IF( A1.NE.ZERO ) THEN
GAMMA = B1 / A1
IF( (GAMMA.LE.HUGENUM).AND.(GAMMA.GE.-HUGENUM) ) THEN
*
* change sign if necessary
*