INTEGER IX
REAL TEMP1
* ..
+* .. External Functions ..
+ LOGICAL SISNAN
+ EXTERNAL SISNAN
+* ..
* .. Intrinsic Functions ..
INTRINSIC ABS, AIMAG, REAL
* ..
*
IF( N.GT.0 ) THEN
DO 10 IX = 1, 1 + ( N-1 )*INCX, INCX
- IF( REAL( X( IX ) ).NE.ZERO ) THEN
- TEMP1 = ABS( REAL( X( IX ) ) )
+ TEMP1 = ABS( REAL( X( IX ) ) )
+ IF( TEMP1.GT.ZERO.OR.SISNAN( TEMP1 ) ) THEN
IF( SCALE.LT.TEMP1 ) THEN
SUMSQ = 1 + SUMSQ*( SCALE / TEMP1 )**2
SCALE = TEMP1
SUMSQ = SUMSQ + ( TEMP1 / SCALE )**2
END IF
END IF
- IF( AIMAG( X( IX ) ).NE.ZERO ) THEN
- TEMP1 = ABS( AIMAG( X( IX ) ) )
- IF( SCALE.LT.TEMP1 ) THEN
+ TEMP1 = ABS( AIMAG( X( IX ) ) )
+ IF( TEMP1.GT.ZERO.OR.SISNAN( TEMP1 ) ) THEN
+ IF( SCALE.LT.TEMP1 .OR. SISNAN( TEMP1 ) ) THEN
SUMSQ = 1 + SUMSQ*( SCALE / TEMP1 )**2
SCALE = TEMP1
ELSE
INTEGER IX
DOUBLE PRECISION ABSXI
* ..
+* .. External Functions ..
+ LOGICAL DISNAN
+ EXTERNAL DISNAN
+* ..
* .. Intrinsic Functions ..
INTRINSIC ABS
* ..
*
IF( N.GT.0 ) THEN
DO 10 IX = 1, 1 + ( N-1 )*INCX, INCX
- IF( X( IX ).NE.ZERO ) THEN
- ABSXI = ABS( X( IX ) )
+ ABSXI = ABS( X( IX ) )
+ IF( ABSXI.GT.ZERO.OR.DISNAN( ABSXI ) ) THEN
IF( SCALE.LT.ABSXI ) THEN
SUMSQ = 1 + SUMSQ*( SCALE / ABSXI )**2
SCALE = ABSXI
INTEGER IX
REAL ABSXI
* ..
+* .. External Functions ..
+ LOGICAL SISNAN
+ EXTERNAL SISNAN
+* ..
* .. Intrinsic Functions ..
INTRINSIC ABS
* ..
*
IF( N.GT.0 ) THEN
DO 10 IX = 1, 1 + ( N-1 )*INCX, INCX
- IF( X( IX ).NE.ZERO ) THEN
- ABSXI = ABS( X( IX ) )
+ ABSXI = ABS( X( IX ) )
+ IF( ABSXI.GT.ZERO.OR.SISNAN( ABSXI ) ) THEN
IF( SCALE.LT.ABSXI ) THEN
SUMSQ = 1 + SUMSQ*( SCALE / ABSXI )**2
SCALE = ABSXI
INTEGER IX
DOUBLE PRECISION TEMP1
* ..
+* .. External Functions ..
+ LOGICAL DISNAN
+ EXTERNAL DISNAN
+* ..
* .. Intrinsic Functions ..
INTRINSIC ABS, DBLE, DIMAG
* ..
*
IF( N.GT.0 ) THEN
DO 10 IX = 1, 1 + ( N-1 )*INCX, INCX
- IF( DBLE( X( IX ) ).NE.ZERO ) THEN
- TEMP1 = ABS( DBLE( X( IX ) ) )
+ TEMP1 = ABS( DBLE( X( IX ) ) )
+ IF( TEMP1.GT.ZERO.OR.DISNAN( TEMP1 ) ) THEN
IF( SCALE.LT.TEMP1 ) THEN
SUMSQ = 1 + SUMSQ*( SCALE / TEMP1 )**2
SCALE = TEMP1
SUMSQ = SUMSQ + ( TEMP1 / SCALE )**2
END IF
END IF
- IF( DIMAG( X( IX ) ).NE.ZERO ) THEN
- TEMP1 = ABS( DIMAG( X( IX ) ) )
+ TEMP1 = ABS( DIMAG( X( IX ) ) )
+ IF( TEMP1.GT.ZERO.OR.DISNAN( TEMP1 ) ) THEN
IF( SCALE.LT.TEMP1 ) THEN
SUMSQ = 1 + SUMSQ*( SCALE / TEMP1 )**2
SCALE = TEMP1