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:
Martin Kroeker
2017-11-10 20:02:21 +01:00
committed by GitHub
parent c460027dbe
commit 2df1e3372d
8 changed files with 8 additions and 8 deletions
+1 -1
View File
@@ -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