Go to the documentation of this file.00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013 #include "f2c.h"
00014 #include "blaswrap.h"
00015
00016 int dlaqr1_(integer *n, doublereal *h__, integer *ldh,
00017 doublereal *sr1, doublereal *si1, doublereal *sr2, doublereal *si2,
00018 doublereal *v)
00019 {
00020
00021 integer h_dim1, h_offset;
00022 doublereal d__1, d__2, d__3;
00023
00024
00025 doublereal s, h21s, h31s;
00026
00027
00028
00029
00030
00031
00032
00033
00034
00035
00036
00037
00038
00039
00040
00041
00042
00043
00044
00045
00046
00047
00048
00049
00050
00051
00052
00053
00054
00055
00056
00057
00058
00059
00060
00061
00062
00063
00064
00065
00066
00067
00068
00069
00070
00071
00072
00073
00074
00075
00076
00077
00078
00079
00080
00081
00082
00083
00084
00085
00086
00087 h_dim1 = *ldh;
00088 h_offset = 1 + h_dim1;
00089 h__ -= h_offset;
00090 --v;
00091
00092
00093 if (*n == 2) {
00094 s = (d__1 = h__[h_dim1 + 1] - *sr2, abs(d__1)) + abs(*si2) + (d__2 =
00095 h__[h_dim1 + 2], abs(d__2));
00096 if (s == 0.) {
00097 v[1] = 0.;
00098 v[2] = 0.;
00099 } else {
00100 h21s = h__[h_dim1 + 2] / s;
00101 v[1] = h21s * h__[(h_dim1 << 1) + 1] + (h__[h_dim1 + 1] - *sr1) *
00102 ((h__[h_dim1 + 1] - *sr2) / s) - *si1 * (*si2 / s);
00103 v[2] = h21s * (h__[h_dim1 + 1] + h__[(h_dim1 << 1) + 2] - *sr1 - *
00104 sr2);
00105 }
00106 } else {
00107 s = (d__1 = h__[h_dim1 + 1] - *sr2, abs(d__1)) + abs(*si2) + (d__2 =
00108 h__[h_dim1 + 2], abs(d__2)) + (d__3 = h__[h_dim1 + 3], abs(
00109 d__3));
00110 if (s == 0.) {
00111 v[1] = 0.;
00112 v[2] = 0.;
00113 v[3] = 0.;
00114 } else {
00115 h21s = h__[h_dim1 + 2] / s;
00116 h31s = h__[h_dim1 + 3] / s;
00117 v[1] = (h__[h_dim1 + 1] - *sr1) * ((h__[h_dim1 + 1] - *sr2) / s)
00118 - *si1 * (*si2 / s) + h__[(h_dim1 << 1) + 1] * h21s + h__[
00119 h_dim1 * 3 + 1] * h31s;
00120 v[2] = h21s * (h__[h_dim1 + 1] + h__[(h_dim1 << 1) + 2] - *sr1 - *
00121 sr2) + h__[h_dim1 * 3 + 2] * h31s;
00122 v[3] = h31s * (h__[h_dim1 + 1] + h__[h_dim1 * 3 + 3] - *sr1 - *
00123 sr2) + h21s * h__[(h_dim1 << 1) + 3];
00124 }
00125 }
00126 return 0;
00127 }