9 int qreval(
double *ev,
double *dp,
int n)
11 double cc, sc = 0.0, d,
x, y, h, tzr = 1.e-15;
13 int j, k, m, mqr = 8 * n;
15 for (j = 0, m = n - 1;; ++j) {
20 if (fabs(dp[k]) <= fabs(ev[m]) * tzr)
23 x = (ev[k] - ev[m]) / 2.;
24 h = sqrt(
x *
x + dp[k] * dp[k]);
25 if (m > 1 && fabs(dp[m - 2]) > fabs(ev[k]) * tzr)
41 for (k = 0; k < m; ++k) {
44 h = sqrt(
x *
x + dp[k] * dp[k]);
52 ev[k] = cc * (ev[k] + y) + ev[k + 1] * sc * sc + d;
54 ev[k] = ev[k] * cc - y;
55 dp[k - 1] = ev[k] * sc;
56 ev[k] = ev[k] * cc + d;
int qreval(double *ev, double *dp, int n)