1DLAQR1(1) LAPACK auxiliary routine (version 3.1) DLAQR1(1)
2
3
4
7 SUBROUTINE DLAQR1( N, H, LDH, SR1, SI1, SR2, SI2, V )
8
9 DOUBLE PRECISION SI1, SI2, SR1, SR2
10
11 INTEGER LDH, N
12
13 DOUBLE PRECISION H( LDH, * ), V( * )
14
15 DOUBLE PRECISION ZERO
16
17 PARAMETER ( ZERO = 0.0d0 )
18
19 DOUBLE PRECISION H21S, H31S, S
20
21 INTRINSIC ABS
22
23 IF( N.EQ.2 ) THEN
24
25 S = ABS( H( 1, 1 )-SR2 ) + ABS( SI2 ) + ABS( H( 2, 1 )
26 )
27
28 IF( S.EQ.ZERO ) THEN
29
30 V( 1 ) = ZERO
31
32 V( 2 ) = ZERO
33
34 ELSE
35
36 H21S = H( 2, 1 ) / S
37
38 V( 1 ) = H21S*H( 1, 2 ) + ( H( 1, 1 )-SR1 )* ( ( H( 1,
39 1 )-SR2 ) / S ) - SI1*( SI2 / S )
40
41 V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-SR1-SR2 )
42
43 END IF
44
45 ELSE
46
47 S = ABS( H( 1, 1 )-SR2 ) + ABS( SI2 ) + ABS( H( 2, 1 )
48 ) + ABS( H( 3, 1 ) )
49
50 IF( S.EQ.ZERO ) THEN
51
52 V( 1 ) = ZERO
53
54 V( 2 ) = ZERO
55
56 V( 3 ) = ZERO
57
58 ELSE
59
60 H21S = H( 2, 1 ) / S
61
62 H31S = H( 3, 1 ) / S
63
64 V( 1 ) = ( H( 1, 1 )-SR1 )*( ( H( 1, 1 )-SR2 ) / S ) -
65 SI1*( SI2 / S ) + H( 1, 2 )*H21S + H( 1, 3 )*H31S
66
67 V( 2 ) = H21S*( H( 1, 1 )+H( 2, 2 )-SR1-SR2 ) + H( 2, 3
68 )*H31S
69
70 V( 3 ) = H31S*( H( 1, 1 )+H( 3, 3 )-SR1-SR2 ) + H21S*H(
71 3, 2 )
72
73 END IF
74
75 END IF
76
77 END
78
80 LAPACK auxiliary routine (versionNo3v.e1m)ber 2006 DLAQR1(1)