mirror of
https://gitlab.com/libeigen/eigen.git
synced 2025-08-12 11:49:02 +08:00
ComplexSchur: fix bug introduced in my previous commit.
The value of c is actually used a few lines later.
This commit is contained in:
parent
90e4a605ef
commit
d86f5339b2
@ -218,10 +218,12 @@ void ComplexSchur<MatrixType>::compute(const MatrixType& matrix, bool skipU)
|
|||||||
sf = t.cwiseAbs().sum();
|
sf = t.cwiseAbs().sum();
|
||||||
t /= sf; // the normalization by sf is to avoid under/overflow
|
t /= sf; // the normalization by sf is to avoid under/overflow
|
||||||
|
|
||||||
b = t.coeff(0,0) + t.coeff(1,1);
|
b = t.coeff(0,1) * t.coeff(1,0);
|
||||||
c = t.coeff(0,0) - t.coeff(1,1);
|
c = t.coeff(0,0) - t.coeff(1,1);
|
||||||
disc = ei_sqrt(c*c + RealScalar(4)*t.coeff(0,1)*t.coeff(1,0));
|
disc = ei_sqrt(c*c + RealScalar(4)*b);
|
||||||
|
|
||||||
|
c = t.coeff(0,0) * t.coeff(1,1) - b;
|
||||||
|
b = t.coeff(0,0) + t.coeff(1,1);
|
||||||
r1 = (b+disc)/RealScalar(2);
|
r1 = (b+disc)/RealScalar(2);
|
||||||
r2 = (b-disc)/RealScalar(2);
|
r2 = (b-disc)/RealScalar(2);
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user