3 * =========== DOCUMENTATION ===========
5 * Online html documentation available at
6 * http://www.netlib.org/lapack/explore-html/
11 * DOUBLE PRECISION FUNCTION DLAMCH( CMACH )
19 *> DLAMCH determines double precision machine parameters.
27 *> Specifies the value to be returned by DLAMCH:
28 *> = 'E' or 'e', DLAMCH := eps
29 *> = 'S' or 's , DLAMCH := sfmin
30 *> = 'B' or 'b', DLAMCH := base
31 *> = 'P' or 'p', DLAMCH := eps*base
32 *> = 'N' or 'n', DLAMCH := t
33 *> = 'R' or 'r', DLAMCH := rnd
34 *> = 'M' or 'm', DLAMCH := emin
35 *> = 'U' or 'u', DLAMCH := rmin
36 *> = 'L' or 'l', DLAMCH := emax
37 *> = 'O' or 'o', DLAMCH := rmax
39 *> eps = relative machine precision
40 *> sfmin = safe minimum, such that 1/sfmin does not overflow
41 *> base = base of the machine
43 *> t = number of (base) digits in the mantissa
44 *> rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
45 *> emin = minimum exponent before (gradual) underflow
46 *> rmin = underflow threshold - base**(emin-1)
47 *> emax = largest exponent before overflow
48 *> rmax = overflow threshold - (base**emax)*(1-eps)
54 *> \author Univ. of Tennessee
55 *> \author Univ. of California Berkeley
56 *> \author Univ. of Colorado Denver
59 *> \date November 2011
61 *> \ingroup auxOTHERauxiliary
63 * =====================================================================
64 DOUBLE PRECISION FUNCTION DLAMCH( CMACH )
66 * -- LAPACK auxiliary routine (version 3.4.0) --
67 * -- LAPACK is a software package provided by Univ. of Tennessee, --
68 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
71 * .. Scalar Arguments ..
75 * .. Scalar Arguments ..
79 * =====================================================================
82 DOUBLE PRECISION ONE, ZERO
83 PARAMETER ( ONE = 1.0D+0, ZERO = 0.0D+0 )
86 DOUBLE PRECISION RND, EPS, SFMIN, SMALL, RMACH
88 * .. External Functions ..
92 * .. Intrinsic Functions ..
93 INTRINSIC DIGITS, EPSILON, HUGE, MAXEXPONENT,
94 $ MINEXPONENT, RADIX, TINY
96 * .. Executable Statements ..
99 * Assume rounding, not chopping. Always.
103 IF( ONE.EQ.RND ) THEN
104 EPS = EPSILON(ZERO) * 0.5
109 IF( LSAME( CMACH, 'E' ) ) THEN
111 ELSE IF( LSAME( CMACH, 'S' ) ) THEN
113 SMALL = ONE / HUGE(ZERO)
114 IF( SMALL.GE.SFMIN ) THEN
116 * Use SMALL plus a bit, to avoid the possibility of rounding
117 * causing overflow when computing 1/sfmin.
119 SFMIN = SMALL*( ONE+EPS )
122 ELSE IF( LSAME( CMACH, 'B' ) ) THEN
124 ELSE IF( LSAME( CMACH, 'P' ) ) THEN
125 RMACH = EPS * RADIX(ZERO)
126 ELSE IF( LSAME( CMACH, 'N' ) ) THEN
128 ELSE IF( LSAME( CMACH, 'R' ) ) THEN
130 ELSE IF( LSAME( CMACH, 'M' ) ) THEN
131 RMACH = MINEXPONENT(ZERO)
132 ELSE IF( LSAME( CMACH, 'U' ) ) THEN
134 ELSE IF( LSAME( CMACH, 'L' ) ) THEN
135 RMACH = MAXEXPONENT(ZERO)
136 ELSE IF( LSAME( CMACH, 'O' ) ) THEN
148 ************************************************************************
153 *> DLAMC3 is intended to force A and B to be stored prior to doing
154 *> the addition of A and B , for use in situations where optimizers
155 *> might hold one of these in a register.
157 *> \author LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
158 *> \date November 2011
159 *> \ingroup auxOTHERauxiliary
163 *> A is a DOUBLE PRECISION
168 *> B is a DOUBLE PRECISION
169 *> The values A and B.
172 DOUBLE PRECISION FUNCTION DLAMC3( A, B )
174 * -- LAPACK auxiliary routine (version 3.4.0) --
175 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
178 * .. Scalar Arguments ..
179 DOUBLE PRECISION A, B
181 * =====================================================================
183 * .. Executable Statements ..
193 ************************************************************************