2329
|
1 SUBROUTINE DLAMC4( EMIN, START, BASE ) |
|
2 * |
3339
|
3 * -- LAPACK auxiliary routine (version 3.0) -- |
2329
|
4 * Univ. of Tennessee, Univ. of California Berkeley, NAG Ltd., |
|
5 * Courant Institute, Argonne National Lab, and Rice University |
|
6 * October 31, 1992 |
|
7 * |
|
8 * .. Scalar Arguments .. |
|
9 INTEGER BASE, EMIN |
|
10 DOUBLE PRECISION START |
|
11 * .. |
|
12 * |
|
13 * Purpose |
|
14 * ======= |
|
15 * |
|
16 * DLAMC4 is a service routine for DLAMC2. |
|
17 * |
|
18 * Arguments |
|
19 * ========= |
|
20 * |
|
21 * EMIN (output) EMIN |
|
22 * The minimum exponent before (gradual) underflow, computed by |
|
23 * setting A = START and dividing by BASE until the previous A |
|
24 * can not be recovered. |
|
25 * |
|
26 * START (input) DOUBLE PRECISION |
|
27 * The starting point for determining EMIN. |
|
28 * |
|
29 * BASE (input) INTEGER |
|
30 * The base of the machine. |
|
31 * |
|
32 * ===================================================================== |
|
33 * |
|
34 * .. Local Scalars .. |
|
35 INTEGER I |
|
36 DOUBLE PRECISION A, B1, B2, C1, C2, D1, D2, ONE, RBASE, ZERO |
|
37 * .. |
|
38 * .. External Functions .. |
|
39 DOUBLE PRECISION DLAMC3 |
|
40 EXTERNAL DLAMC3 |
|
41 * .. |
|
42 * .. Executable Statements .. |
|
43 * |
|
44 A = START |
|
45 ONE = 1 |
|
46 RBASE = ONE / BASE |
|
47 ZERO = 0 |
|
48 EMIN = 1 |
|
49 B1 = DLAMC3( A*RBASE, ZERO ) |
|
50 C1 = A |
|
51 C2 = A |
|
52 D1 = A |
|
53 D2 = A |
|
54 *+ WHILE( ( C1.EQ.A ).AND.( C2.EQ.A ).AND. |
|
55 * $ ( D1.EQ.A ).AND.( D2.EQ.A ) )LOOP |
|
56 10 CONTINUE |
|
57 IF( ( C1.EQ.A ) .AND. ( C2.EQ.A ) .AND. ( D1.EQ.A ) .AND. |
|
58 $ ( D2.EQ.A ) ) THEN |
|
59 EMIN = EMIN - 1 |
|
60 A = B1 |
|
61 B1 = DLAMC3( A / BASE, ZERO ) |
|
62 C1 = DLAMC3( B1*BASE, ZERO ) |
|
63 D1 = ZERO |
|
64 DO 20 I = 1, BASE |
|
65 D1 = D1 + B1 |
|
66 20 CONTINUE |
|
67 B2 = DLAMC3( A*RBASE, ZERO ) |
|
68 C2 = DLAMC3( B2 / RBASE, ZERO ) |
|
69 D2 = ZERO |
|
70 DO 30 I = 1, BASE |
|
71 D2 = D2 + B2 |
|
72 30 CONTINUE |
|
73 GO TO 10 |
|
74 END IF |
|
75 *+ END WHILE |
|
76 * |
|
77 RETURN |
|
78 * |
|
79 * End of DLAMC4 |
|
80 * |
|
81 END |