--- rpl/lapack/lapack/dlarrb.f 2011/11/21 22:19:34 1.9
+++ rpl/lapack/lapack/dlarrb.f 2023/08/07 08:38:57 1.20
@@ -1,19 +1,19 @@
-*> \brief \b DLARRB
+*> \brief \b DLARRB provides limited bisection to locate eigenvalues for more accuracy.
*
* =========== 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 DLARRB + dependencies
-*>
-*> [TGZ]
-*>
-*> [ZIP]
-*>
+*> Download DLARRB + dependencies
+*>
+*> [TGZ]
+*>
+*> [ZIP]
+*>
*> [TXT]
-*> \endhtmlonly
+*> \endhtmlonly
*
* Definition:
* ===========
@@ -21,7 +21,7 @@
* SUBROUTINE DLARRB( N, D, LLD, IFIRST, ILAST, RTOL1,
* RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
* PIVMIN, SPDIAM, TWIST, INFO )
-*
+*
* .. Scalar Arguments ..
* INTEGER IFIRST, ILAST, INFO, N, OFFSET, TWIST
* DOUBLE PRECISION PIVMIN, RTOL1, RTOL2, SPDIAM
@@ -31,7 +31,7 @@
* DOUBLE PRECISION D( * ), LLD( * ), W( * ),
* $ WERR( * ), WGAP( * ), WORK( * )
* ..
-*
+*
*
*> \par Purpose:
* =============
@@ -91,7 +91,7 @@
*> RTOL2 is DOUBLE PRECISION
*> Tolerance for the convergence of the bisection intervals.
*> An interval [LEFT,RIGHT] has converged if
-*> RIGHT-LEFT.LT.MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
+*> RIGHT-LEFT < MAX( RTOL1*GAP, RTOL2*MAX(|LEFT|,|RIGHT|) )
*> where GAP is the (estimated) distance to the nearest
*> eigenvalue.
*> \endverbatim
@@ -107,7 +107,7 @@
*> \verbatim
*> W is DOUBLE PRECISION array, dimension (N)
*> On input, W( IFIRST-OFFSET ) through W( ILAST-OFFSET ) are
-*> estimates of the eigenvalues of L D L^T indexed IFIRST throug
+*> estimates of the eigenvalues of L D L^T indexed IFIRST through
*> ILAST.
*> On output, these estimates are refined.
*> \endverbatim
@@ -117,7 +117,7 @@
*> WGAP is DOUBLE PRECISION array, dimension (N-1)
*> On input, the (estimated) gaps between consecutive
*> eigenvalues of L D L^T, i.e., WGAP(I-OFFSET) is the gap between
-*> eigenvalues I and I+1. Note that if IFIRST.EQ.ILAST
+*> eigenvalues I and I+1. Note that if IFIRST = ILAST
*> then WGAP(IFIRST-OFFSET) must be set to ZERO.
*> On output, these gaps are refined.
*> \endverbatim
@@ -173,14 +173,12 @@
* 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 auxOTHERauxiliary
+*> \ingroup OTHERauxiliary
*
*> \par Contributors:
* ==================
@@ -196,10 +194,9 @@
$ RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
$ PIVMIN, SPDIAM, TWIST, INFO )
*
-* -- 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 IFIRST, ILAST, INFO, N, OFFSET, TWIST
@@ -237,6 +234,12 @@
*
INFO = 0
*
+* Quick return if possible
+*
+ IF( N.LE.0 ) THEN
+ RETURN
+ END IF
+*
MAXITR = INT( ( LOG( SPDIAM+PIVMIN )-LOG( PIVMIN ) ) /
$ LOG( TWO ) ) + 2
MNWDTH = TWO * PIVMIN