Break out of potentially infinite rescaling loop after 1000 iterations
Inf values in the input vector will survive rescaling, causing an infinite loop. The value of 1000 is arbitrarily chosen as a large but finite value with the intention to never interfere with regular calculations.
This commit is contained in:
@@ -197,7 +197,7 @@
|
||||
BETA = BETA*BIGNUM
|
||||
ALPHI = ALPHI*BIGNUM
|
||||
ALPHR = ALPHR*BIGNUM
|
||||
IF( ABS( BETA ).LT.SMLNUM )
|
||||
IF( ABS( BETA ).LT.SMLNUM .AND. KNT .LT. 1000 )
|
||||
$ GO TO 10
|
||||
*
|
||||
* New BETA is at most 1, at least SMLNUM
|
||||
|
||||
Reference in New Issue
Block a user