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 slaqr1_(integer *n, real *h__, integer *ldh, real *sr1,
00017 real *si1, real *sr2, real *si2, real *v)
00018 {
00019
00020 integer h_dim1, h_offset;
00021 real r__1, r__2, r__3;
00022
00023
00024 real s, h21s, h31s;
00025
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 h_dim1 = *ldh;
00087 h_offset = 1 + h_dim1;
00088 h__ -= h_offset;
00089 --v;
00090
00091
00092 if (*n == 2) {
00093 s = (r__1 = h__[h_dim1 + 1] - *sr2, dabs(r__1)) + dabs(*si2) + (r__2 =
00094 h__[h_dim1 + 2], dabs(r__2));
00095 if (s == 0.f) {
00096 v[1] = 0.f;
00097 v[2] = 0.f;
00098 } else {
00099 h21s = h__[h_dim1 + 2] / s;
00100 v[1] = h21s * h__[(h_dim1 << 1) + 1] + (h__[h_dim1 + 1] - *sr1) *
00101 ((h__[h_dim1 + 1] - *sr2) / s) - *si1 * (*si2 / s);
00102 v[2] = h21s * (h__[h_dim1 + 1] + h__[(h_dim1 << 1) + 2] - *sr1 - *
00103 sr2);
00104 }
00105 } else {
00106 s = (r__1 = h__[h_dim1 + 1] - *sr2, dabs(r__1)) + dabs(*si2) + (r__2 =
00107 h__[h_dim1 + 2], dabs(r__2)) + (r__3 = h__[h_dim1 + 3], dabs(
00108 r__3));
00109 if (s == 0.f) {
00110 v[1] = 0.f;
00111 v[2] = 0.f;
00112 v[3] = 0.f;
00113 } else {
00114 h21s = h__[h_dim1 + 2] / s;
00115 h31s = h__[h_dim1 + 3] / s;
00116 v[1] = (h__[h_dim1 + 1] - *sr1) * ((h__[h_dim1 + 1] - *sr2) / s)
00117 - *si1 * (*si2 / s) + h__[(h_dim1 << 1) + 1] * h21s + h__[
00118 h_dim1 * 3 + 1] * h31s;
00119 v[2] = h21s * (h__[h_dim1 + 1] + h__[(h_dim1 << 1) + 2] - *sr1 - *
00120 sr2) + h__[h_dim1 * 3 + 2] * h31s;
00121 v[3] = h31s * (h__[h_dim1 + 1] + h__[h_dim1 * 3 + 3] - *sr1 - *
00122 sr2) + h21s * h__[(h_dim1 << 1) + 3];
00123 }
00124 }
00125 return 0;
00126 }