version 1.13, 2014/01/27 09:28:19
|
version 1.19, 2023/08/07 08:38:54
|
Line 2
|
Line 2
|
* |
* |
* =========== DOCUMENTATION =========== |
* =========== DOCUMENTATION =========== |
* |
* |
* Online html documentation available at |
* Online html documentation available at |
* http://www.netlib.org/lapack/explore-html/ |
* http://www.netlib.org/lapack/explore-html/ |
* |
* |
*> \htmlonly |
*> \htmlonly |
*> Download DLAG2 + dependencies |
*> Download DLAG2 + dependencies |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlag2.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.tgz?format=tgz&filename=/lapack/lapack_routine/dlag2.f"> |
*> [TGZ]</a> |
*> [TGZ]</a> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlag2.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.zip?format=zip&filename=/lapack/lapack_routine/dlag2.f"> |
*> [ZIP]</a> |
*> [ZIP]</a> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlag2.f"> |
*> <a href="http://www.netlib.org/cgi-bin/netlibfiles.txt?format=txt&filename=/lapack/lapack_routine/dlag2.f"> |
*> [TXT]</a> |
*> [TXT]</a> |
*> \endhtmlonly |
*> \endhtmlonly |
* |
* |
* Definition: |
* Definition: |
* =========== |
* =========== |
* |
* |
* SUBROUTINE DLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1, |
* SUBROUTINE DLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1, |
* WR2, WI ) |
* WR2, WI ) |
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
* INTEGER LDA, LDB |
* INTEGER LDA, LDB |
* DOUBLE PRECISION SAFMIN, SCALE1, SCALE2, WI, WR1, WR2 |
* DOUBLE PRECISION SAFMIN, SCALE1, SCALE2, WI, WR1, WR2 |
Line 28
|
Line 28
|
* .. Array Arguments .. |
* .. Array Arguments .. |
* DOUBLE PRECISION A( LDA, * ), B( LDB, * ) |
* DOUBLE PRECISION A( LDA, * ), B( LDB, * ) |
* .. |
* .. |
* |
* |
* |
* |
*> \par Purpose: |
*> \par Purpose: |
* ============= |
* ============= |
Line 99
|
Line 99
|
*> will always be positive. If the eigenvalues are real, then |
*> will always be positive. If the eigenvalues are real, then |
*> the first (real) eigenvalue is WR1 / SCALE1 , but this may |
*> the first (real) eigenvalue is WR1 / SCALE1 , but this may |
*> overflow or underflow, and in fact, SCALE1 may be zero or |
*> overflow or underflow, and in fact, SCALE1 may be zero or |
*> less than the underflow threshhold if the exact eigenvalue |
*> less than the underflow threshold if the exact eigenvalue |
*> is sufficiently large. |
*> is sufficiently large. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
Line 112
|
Line 112
|
*> eigenvalues are real, then the second (real) eigenvalue is |
*> eigenvalues are real, then the second (real) eigenvalue is |
*> WR2 / SCALE2 , but this may overflow or underflow, and in |
*> WR2 / SCALE2 , but this may overflow or underflow, and in |
*> fact, SCALE2 may be zero or less than the underflow |
*> fact, SCALE2 may be zero or less than the underflow |
*> threshhold if the exact eigenvalue is sufficiently large. |
*> threshold if the exact eigenvalue is sufficiently large. |
*> \endverbatim |
*> \endverbatim |
*> |
*> |
*> \param[out] WR1 |
*> \param[out] WR1 |
Line 143
|
Line 143
|
* Authors: |
* Authors: |
* ======== |
* ======== |
* |
* |
*> \author Univ. of Tennessee |
*> \author Univ. of Tennessee |
*> \author Univ. of California Berkeley |
*> \author Univ. of California Berkeley |
*> \author Univ. of Colorado Denver |
*> \author Univ. of Colorado Denver |
*> \author NAG Ltd. |
*> \author NAG Ltd. |
* |
|
*> \date September 2012 |
|
* |
* |
*> \ingroup doubleOTHERauxiliary |
*> \ingroup doubleOTHERauxiliary |
* |
* |
Line 156
|
Line 154
|
SUBROUTINE DLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1, |
SUBROUTINE DLAG2( A, LDA, B, LDB, SAFMIN, SCALE1, SCALE2, WR1, |
$ WR2, WI ) |
$ WR2, WI ) |
* |
* |
* -- LAPACK auxiliary routine (version 3.4.2) -- |
* -- LAPACK auxiliary routine -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- LAPACK is a software package provided by Univ. of Tennessee, -- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..-- |
* September 2012 |
|
* |
* |
* .. Scalar Arguments .. |
* .. Scalar Arguments .. |
INTEGER LDA, LDB |
INTEGER LDA, LDB |
Line 266
|
Line 263
|
* Note: the test of R in the following IF is to cover the case when |
* Note: the test of R in the following IF is to cover the case when |
* DISCR is small and negative and is flushed to zero during |
* DISCR is small and negative and is flushed to zero during |
* the calculation of R. On machines which have a consistent |
* the calculation of R. On machines which have a consistent |
* flush-to-zero threshhold and handle numbers above that |
* flush-to-zero threshold and handle numbers above that |
* threshhold correctly, it would not be necessary. |
* threshold correctly, it would not be necessary. |
* |
* |
IF( DISCR.GE.ZERO .OR. R.EQ.ZERO ) THEN |
IF( DISCR.GE.ZERO .OR. R.EQ.ZERO ) THEN |
SUM = PP + SIGN( R, PP ) |
SUM = PP + SIGN( R, PP ) |