Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 9 additions & 5 deletions lapack-netlib/SRC/clarrv.f
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
*> Download CLARRV + dependencies
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/clarrv.f">
*> [TGZ]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/clarrv.f">
*> [ZIP]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/clarrv.f">
*> [TXT]</a>
*> \endhtmlonly
*
* Definition:
* ===========
Expand Down Expand Up @@ -266,7 +264,7 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup complexOTHERauxiliary
*> \ingroup larrv
*
*> \par Contributors:
* ==================
Expand All @@ -283,6 +281,7 @@ SUBROUTINE CLARRV( N, VL, VU, D, L, PIVMIN,
$ RTOL1, RTOL2, W, WERR, WGAP,
$ IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
$ WORK, IWORK, INFO )
IMPLICIT NONE
*
* -- LAPACK auxiliary routine --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
Expand Down Expand Up @@ -334,7 +333,8 @@ SUBROUTINE CLARRV( N, VL, VU, D, L, PIVMIN,
EXTERNAL SLAMCH
* ..
* .. External Subroutines ..
EXTERNAL CLAR1V, CLASET, CSSCAL, SCOPY, SLARRB,
EXTERNAL CLAR1V, CLASET, CSSCAL, SCOPY,
$ SLARRB,
$ SLARRF
* ..
* .. Intrinsic Functions ..
Expand All @@ -348,7 +348,7 @@ SUBROUTINE CLARRV( N, VL, VU, D, L, PIVMIN,
*
* Quick return if possible
*
IF( (N.LE.0) .OR. (M.LE.0) ) THEN
IF( (N.LE.0).OR.(M.LE.0) ) THEN
RETURN
END IF
*
Expand Down Expand Up @@ -702,6 +702,10 @@ SUBROUTINE CLARRV( N, VL, VU, D, L, PIVMIN,
$ WERR(WBEGIN),WORK( INDWRK ),
$ IWORK( IINDWK ), PIVMIN, SPDIAM,
$ IN, IINFO )
IF( IINFO.NE.0 ) THEN
INFO = -1
RETURN
END IF
55 CONTINUE
*
IF((WBEGIN+NEWLST-1.LT.DOL).OR.
Expand Down
22 changes: 14 additions & 8 deletions lapack-netlib/SRC/cstemr.f
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
*> Download CSTEMR + dependencies
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/cstemr.f">
*> [TGZ]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/cstemr.f">
*> [ZIP]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/cstemr.f">
*> [TXT]</a>
*> \endhtmlonly
*
* Definition:
* ===========
Expand Down Expand Up @@ -306,10 +304,11 @@
*> = 0: successful exit
*> < 0: if INFO = -i, the i-th argument had an illegal value
*> > 0: if INFO = 1X, internal error in SLARRE,
*> if INFO = 2X, internal error in CLARRV.
*> if INFO = 2X, internal error in CLARRV,
*> if INFO = 3X, internal error in SLARRJ.
*> Here, the digit X = ABS( IINFO ) < 10, where IINFO is
*> the nonzero error code returned by SLARRE or
*> CLARRV, respectively.
*> the nonzero error code returned by SLARRE, CLARRV
*> or SLARRJ, respectively.
*> \endverbatim
*
* Authors:
Expand All @@ -336,6 +335,7 @@
SUBROUTINE CSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ M, W, Z, LDZ, NZC, ISUPPZ, TRYRAC, WORK, LWORK,
$ IWORK, LIWORK, INFO )
IMPLICIT NONE
*
* -- LAPACK computational routine --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
Expand Down Expand Up @@ -377,10 +377,12 @@ SUBROUTINE CSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
* .. External Functions ..
LOGICAL LSAME
REAL SLAMCH, SLANST, SROUNDUP_LWORK
EXTERNAL LSAME, SLAMCH, SLANST, SROUNDUP_LWORK
EXTERNAL LSAME, SLAMCH, SLANST,
$ SROUNDUP_LWORK
* ..
* .. External Subroutines ..
EXTERNAL CLARRV, CSWAP, SCOPY, SLAE2, SLAEV2, SLARRC,
EXTERNAL CLARRV, CSWAP, SCOPY, SLAE2, SLAEV2,
$ SLARRC,
$ SLARRE, SLARRJ, SLARRR, SLASRT, SSCAL, XERBLA
* ..
* .. Intrinsic Functions ..
Expand Down Expand Up @@ -477,7 +479,7 @@ SUBROUTINE CSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
NZCMIN = 0
ENDIF
IF( ZQUERY .AND. INFO.EQ.0 ) THEN
Z( 1,1 ) = NZCMIN
Z( 1,1 ) = CMPLX( NZCMIN )
ELSE IF( NZC.LT.NZCMIN .AND. .NOT.ZQUERY ) THEN
INFO = -14
END IF
Expand Down Expand Up @@ -751,6 +753,10 @@ SUBROUTINE CSTEMR( JOBZ, RANGE, N, D, E, VL, VU, IL, IU,
$ WORK( INDERR+WBEGIN-1 ),
$ WORK( INDWRK ), IWORK( IINDWK ), PIVMIN,
$ TNRM, IINFO )
IF( IINFO.NE.0 ) THEN
INFO = 30 + ABS( IINFO )
RETURN
END IF
IBEGIN = IEND + 1
WBEGIN = WEND + 1
39 CONTINUE
Expand Down
43 changes: 31 additions & 12 deletions lapack-netlib/SRC/dlarrb.f
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
*> Download DLARRB + dependencies
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrb.f">
*> [TGZ]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrb.f">
*> [ZIP]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrb.f">
*> [TXT]</a>
*> \endhtmlonly
*
* Definition:
* ===========
Expand Down Expand Up @@ -167,7 +165,11 @@
*> \param[out] INFO
*> \verbatim
*> INFO is INTEGER
*> Error flag.
*> = 0: successful exit
*> = 1: the interval around one of the eigenvalues could not
*> be widened to contain it: the Sturm counts of the
*> representation are inconsistent, as they are when it
*> contains a NaN or an Inf.
*> \endverbatim
*
* Authors:
Expand All @@ -178,7 +180,7 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup OTHERauxiliary
*> \ingroup larrb
*
*> \par Contributors:
* ==================
Expand All @@ -193,6 +195,7 @@
SUBROUTINE DLARRB( N, D, LLD, IFIRST, ILAST, RTOL1,
$ RTOL2, OFFSET, W, WGAP, WERR, WORK, IWORK,
$ PIVMIN, SPDIAM, TWIST, INFO )
IMPLICIT NONE
*
* -- LAPACK auxiliary routine --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
Expand Down Expand Up @@ -275,10 +278,23 @@ SUBROUTINE DLARRB( N, D, LLD, IFIRST, ILAST, RTOL1,
*
* Do while( NEGCNT(LEFT).GT.I-1 )
*
BACK = WERR( II )
* The interval is widened by BACK, doubled at every step, until
* the Sturm count agrees with the index. In exact arithmetic
* this terminates because the count is 0 below the spectrum and
* N above it. A NaN or an Inf in the representation is never
* counted, so the count can stay short of the index; stop once
* BACK has overflowed, when no further step can move the
* endpoint. BACK starts at no less than the minimum interval
* width so that a zero WERR still makes progress.
*
BACK = MAX( WERR( II ), MNWDTH )
20 CONTINUE
NEGCNT = DLANEG( N, D, LLD, LEFT, PIVMIN, R )
IF( NEGCNT.GT.I-1 ) THEN
IF( .NOT.( BACK.LT.TWO*BACK ) ) THEN
INFO = 1
RETURN
END IF
LEFT = LEFT - BACK
BACK = TWO*BACK
GO TO 20
Expand All @@ -287,15 +303,18 @@ SUBROUTINE DLARRB( N, D, LLD, IFIRST, ILAST, RTOL1,
* Do while( NEGCNT(RIGHT).LT.I )
* Compute negcount from dstqds facto L+D+L+^T = L D L^T - RIGHT
*
BACK = WERR( II )
BACK = MAX( WERR( II ), MNWDTH )
50 CONTINUE

NEGCNT = DLANEG( N, D, LLD, RIGHT, PIVMIN, R )
IF( NEGCNT.LT.I ) THEN
RIGHT = RIGHT + BACK
BACK = TWO*BACK
GO TO 50
END IF
IF( NEGCNT.LT.I ) THEN
IF( .NOT.( BACK.LT.TWO*BACK ) ) THEN
INFO = 1
RETURN
END IF
RIGHT = RIGHT + BACK
BACK = TWO*BACK
GO TO 50
END IF
WIDTH = HALF*ABS( LEFT - RIGHT )
TMP = MAX( ABS( LEFT ), ABS( RIGHT ) )
CVRGD = MAX(RTOL1*GAP,RTOL2*TMP)
Expand Down
42 changes: 31 additions & 11 deletions lapack-netlib/SRC/dlarrj.f
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
*> Download DLARRJ + dependencies
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrj.f">
*> [TGZ]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrj.f">
*> [ZIP]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrj.f">
*> [TXT]</a>
*> \endhtmlonly
*
* Definition:
* ===========
Expand Down Expand Up @@ -139,7 +137,11 @@
*> \param[out] INFO
*> \verbatim
*> INFO is INTEGER
*> Error flag.
*> = 0: successful exit
*> = 1: the interval around one of the eigenvalues could not
*> be widened to contain it: the Sturm counts of the
*> matrix are inconsistent, as they are when it contains
*> a NaN or an Inf.
*> \endverbatim
*
* Authors:
Expand All @@ -150,7 +152,7 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup OTHERauxiliary
*> \ingroup larrj
*
*> \par Contributors:
* ==================
Expand All @@ -165,6 +167,7 @@
SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST,
$ RTOL, OFFSET, W, WERR, WORK, IWORK,
$ PIVMIN, SPDIAM, INFO )
IMPLICIT NONE
*
* -- LAPACK auxiliary routine --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
Expand All @@ -191,7 +194,7 @@ SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST,
* .. Local Scalars ..
INTEGER CNT, I, I1, I2, II, ITER, J, K, NEXT, NINT,
$ OLNINT, P, PREV, SAVI1
DOUBLE PRECISION DPLUS, FAC, LEFT, MID, RIGHT, S, TMP, WIDTH
DOUBLE PRECISION BACK, DPLUS, LEFT, MID, RIGHT, S, TMP, WIDTH
*
* ..
* .. Intrinsic Functions ..
Expand Down Expand Up @@ -250,7 +253,16 @@ SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST,
*
* Do while( CNT(LEFT).GT.I-1 )
*
FAC = ONE
* The interval is widened by BACK, doubled at every step,
* until the Sturm count agrees with the index. In exact
* arithmetic this terminates because the count is 0 below the
* spectrum and N above it. A NaN or an Inf in the matrix is
* never counted, so the count can stay short of the index;
* stop once BACK has overflowed, when no further step can move
* the endpoint. BACK starts at no less than the minimum
* interval width so that a zero WERR still makes progress.
*
BACK = MAX( WERR( II ), TWO*PIVMIN )
20 CONTINUE
CNT = 0
S = LEFT
Expand All @@ -261,14 +273,18 @@ SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST,
IF( DPLUS.LT.ZERO ) CNT = CNT + 1
30 CONTINUE
IF( CNT.GT.I-1 ) THEN
LEFT = LEFT - WERR( II )*FAC
FAC = TWO*FAC
IF( .NOT.( BACK.LT.TWO*BACK ) ) THEN
INFO = 1
RETURN
END IF
LEFT = LEFT - BACK
BACK = TWO*BACK
GO TO 20
END IF
*
* Do while( CNT(RIGHT).LT.I )
*
FAC = ONE
BACK = MAX( WERR( II ), TWO*PIVMIN )
50 CONTINUE
CNT = 0
S = RIGHT
Expand All @@ -279,8 +295,12 @@ SUBROUTINE DLARRJ( N, D, E2, IFIRST, ILAST,
IF( DPLUS.LT.ZERO ) CNT = CNT + 1
60 CONTINUE
IF( CNT.LT.I ) THEN
RIGHT = RIGHT + WERR( II )*FAC
FAC = TWO*FAC
IF( .NOT.( BACK.LT.TWO*BACK ) ) THEN
INFO = 1
RETURN
END IF
RIGHT = RIGHT + BACK
BACK = TWO*BACK
GO TO 50
END IF
NINT = NINT + 1
Expand Down
12 changes: 8 additions & 4 deletions lapack-netlib/SRC/dlarrv.f
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,13 @@
* Online html documentation available at
* http://www.netlib.org/lapack/explore-html/
*
*> \htmlonly
*> Download DLARRV + dependencies
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlarrv.f">
*> [TGZ]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlarrv.f">
*> [ZIP]</a>
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlarrv.f">
*> [TXT]</a>
*> \endhtmlonly
*
* Definition:
* ===========
Expand Down Expand Up @@ -272,7 +270,7 @@
*> \author Univ. of Colorado Denver
*> \author NAG Ltd.
*
*> \ingroup doubleOTHERauxiliary
*> \ingroup larrv
*
*> \par Contributors:
* ==================
Expand All @@ -289,6 +287,7 @@ SUBROUTINE DLARRV( N, VL, VU, D, L, PIVMIN,
$ RTOL1, RTOL2, W, WERR, WGAP,
$ IBLOCK, INDEXW, GERS, Z, LDZ, ISUPPZ,
$ WORK, IWORK, INFO )
IMPLICIT NONE
*
* -- LAPACK auxiliary routine --
* -- LAPACK is a software package provided by Univ. of Tennessee, --
Expand Down Expand Up @@ -337,7 +336,8 @@ SUBROUTINE DLARRV( N, VL, VU, D, L, PIVMIN,
EXTERNAL DLAMCH
* ..
* .. External Subroutines ..
EXTERNAL DCOPY, DLAR1V, DLARRB, DLARRF, DLASET,
EXTERNAL DCOPY, DLAR1V, DLARRB, DLARRF,
$ DLASET,
$ DSCAL
* ..
* .. Intrinsic Functions ..
Expand Down Expand Up @@ -698,6 +698,10 @@ SUBROUTINE DLARRV( N, VL, VU, D, L, PIVMIN,
$ WERR(WBEGIN),WORK( INDWRK ),
$ IWORK( IINDWK ), PIVMIN, SPDIAM,
$ IN, IINFO )
IF( IINFO.NE.0 ) THEN
INFO = -1
RETURN
END IF
55 CONTINUE
*
IF((WBEGIN+NEWLST-1.LT.DOL).OR.
Expand Down
Loading
Loading