MCPcopy Create free account
hub / github.com/numpy/numpy / dlae2_

Function dlae2_

numpy/linalg/lapack_lite/f2c_d_lapack.c:8587–8708  ·  view source on GitHub ↗

Subroutine */

Source from the content-addressed store, hash-verified

8585} /* dladiv_ */
8586
8587/* Subroutine */ int dlae2_(doublereal *a, doublereal *b, doublereal *c__,
8588 doublereal *rt1, doublereal *rt2)
8589{
8590 /* System generated locals */
8591 doublereal d__1;
8592
8593 /* Local variables */
8594 static doublereal ab, df, tb, sm, rt, adf, acmn, acmx;
8595
8596
8597/*
8598 -- LAPACK auxiliary routine (version 3.2) --
8599 -- LAPACK is a software package provided by Univ. of Tennessee, --
8600 -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
8601 November 2006
8602
8603
8604 Purpose
8605 =======
8606
8607 DLAE2 computes the eigenvalues of a 2-by-2 symmetric matrix
8608 [ A B ]
8609 [ B C ].
8610 On return, RT1 is the eigenvalue of larger absolute value, and RT2
8611 is the eigenvalue of smaller absolute value.
8612
8613 Arguments
8614 =========
8615
8616 A (input) DOUBLE PRECISION
8617 The (1,1) element of the 2-by-2 matrix.
8618
8619 B (input) DOUBLE PRECISION
8620 The (1,2) and (2,1) elements of the 2-by-2 matrix.
8621
8622 C (input) DOUBLE PRECISION
8623 The (2,2) element of the 2-by-2 matrix.
8624
8625 RT1 (output) DOUBLE PRECISION
8626 The eigenvalue of larger absolute value.
8627
8628 RT2 (output) DOUBLE PRECISION
8629 The eigenvalue of smaller absolute value.
8630
8631 Further Details
8632 ===============
8633
8634 RT1 is accurate to a few ulps barring over/underflow.
8635
8636 RT2 may be inaccurate if there is massive cancellation in the
8637 determinant A*C-B*B; higher precision or correctly rounded or
8638 correctly truncated arithmetic would be needed to compute RT2
8639 accurately in all cases.
8640
8641 Overflow is possible only if RT1 is within a factor of 5 of overflow.
8642 Underflow is harmless if the input data is 0 or exceeds
8643 underflow_threshold / macheps.
8644

Callers 3

dsteqr_Function · 0.85
dsterf_Function · 0.85
zsteqr_Function · 0.85

Calls 2

absFunction · 0.85
sqrtFunction · 0.50

Tested by

no test coverage detected