--- rpl/lapack/lapack/zlarfgp.f 2011/11/21 22:19:53 1.7
+++ rpl/lapack/lapack/zlarfgp.f 2023/08/07 08:39:31 1.18
@@ -1,25 +1,25 @@
-*> \brief \b ZLARFGP
+*> \brief \b ZLARFGP generates an elementary reflector (Householder matrix) with non-negative beta.
*
* =========== DOCUMENTATION ===========
*
-* Online html documentation available at
-* http://www.netlib.org/lapack/explore-html/
+* Online html documentation available at
+* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
-*> Download ZLARFGP + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
+*> Download ZLARFGP + dependencies
+*>
+*> [TGZ]
+*>
+*> [ZIP]
+*>
*> [TXT]
-*> \endhtmlonly
+*> \endhtmlonly
*
* Definition:
* ===========
*
* SUBROUTINE ZLARFGP( N, ALPHA, X, INCX, TAU )
-*
+*
* .. Scalar Arguments ..
* INTEGER INCX, N
* COMPLEX*16 ALPHA, TAU
@@ -27,7 +27,7 @@
* .. Array Arguments ..
* COMPLEX*16 X( * )
* ..
-*
+*
*
*> \par Purpose:
* =============
@@ -92,22 +92,19 @@
* Authors:
* ========
*
-*> \author Univ. of Tennessee
-*> \author Univ. of California Berkeley
-*> \author Univ. of Colorado Denver
-*> \author NAG Ltd.
-*
-*> \date November 2011
+*> \author Univ. of Tennessee
+*> \author Univ. of California Berkeley
+*> \author Univ. of Colorado Denver
+*> \author NAG Ltd.
*
*> \ingroup complex16OTHERauxiliary
*
* =====================================================================
SUBROUTINE ZLARFGP( N, ALPHA, X, INCX, TAU )
*
-* -- LAPACK auxiliary routine (version 3.4.0) --
+* -- LAPACK auxiliary routine --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
-* November 2011
*
* .. Scalar Arguments ..
INTEGER INCX, N
@@ -197,7 +194,7 @@
BETA = BETA*BIGNUM
ALPHI = ALPHI*BIGNUM
ALPHR = ALPHR*BIGNUM
- IF( ABS( BETA ).LT.SMLNUM )
+ IF( (ABS( BETA ).LT.SMLNUM) .AND. (KNT .LT. 20) )
$ GO TO 10
*
* New BETA is at most 1, at least SMLNUM
@@ -222,7 +219,7 @@
IF ( ABS(TAU).LE.SMLNUM ) THEN
*
* In the case where the computed TAU ends up being a denormalized number,
-* it loses relative accuracy. This is a BIG problem. Solution: flush TAU
+* it loses relative accuracy. This is a BIG problem. Solution: flush TAU
* to ZERO (or TWO or whatever makes a nonnegative real number for BETA).
*
* (Bug report provided by Pat Quillen from MathWorks on Jul 29, 2009.)
@@ -238,7 +235,7 @@
DO J = 1, N-1
X( 1 + (J-1)*INCX ) = ZERO
END DO
- BETA = -SAVEALPHA
+ BETA = DBLE( -SAVEALPHA )
END IF
ELSE
XNORM = DLAPY2( ALPHR, ALPHI )
@@ -249,7 +246,7 @@
BETA = XNORM
END IF
*
- ELSE
+ ELSE
*
* This is the general case.
*