27#define SQR(x) ((x)*(x))
28#define SQR_ABS(x) (SQR(real(x)) + SQR(imag(x)))
31int zheevh3(std::complex<double> A[3][3], std::complex<double> Q[3][3],
double w[3])
74 if ((u=fabs(w[1])) > t)
76 if ((u=fabs(w[2])) > t)
82 error = 256.0 * DBL_EPSILON *
SQR(u);
85 Q[0][1] = A[0][1]*A[1][2] - A[0][2]*real(A[1][1]);
86 Q[1][1] = A[0][2]*conj(A[0][1]) - A[1][2]*real(A[0][0]);
91 Q[0][0] = Q[0][1] + A[0][2]*w[0];
92 Q[1][0] = Q[1][1] + A[1][2]*w[0];
93 Q[2][0] = (real(A[0][0]) - w[0]) * (real(A[1][1]) - w[0]) - Q[2][1];
106 norm = sqrt(1.0 / norm);
107 for (j=0; j < 3; j++)
108 Q[j][0] = Q[j][0] * norm;
113 Q[0][1] = Q[0][1] + A[0][2]*w[1];
114 Q[1][1] = Q[1][1] + A[1][2]*w[1];
115 Q[2][1] = (real(A[0][0]) - w[1]) * (real(A[1][1]) - w[1]) - real(Q[2][1]);
121 norm = sqrt(1.0 / norm);
122 for (j=0; j < 3; j++)
123 Q[j][1] = Q[j][1] * norm;
128 Q[0][2] = conj(Q[1][0]*Q[2][1] - Q[2][0]*Q[1][1]);
129 Q[1][2] = conj(Q[2][0]*Q[0][1] - Q[0][0]*Q[2][1]);
130 Q[2][2] = conj(Q[0][0]*Q[1][1] - Q[1][0]*Q[0][1]);
int zheevc3(std::complex< double > A[3][3], double w[3])
int zheevh3(std::complex< double > A[3][3], std::complex< double > Q[3][3], double w[3])
int zheevq3(std::complex< double > A[3][3], std::complex< double > Q[3][3], double w[3])