3 * =========== DOCUMENTATION
===========
5 * Online html documentation available at
6 * http
://www
.netlib
.org
/lapack
/explore
-html
/
11 * REAL FUNCTION SLAMCH
( CMACH
)
13 * .. Scalar Arguments
..
23 *> SLAMCH determines single
precision machine parameters
.
31 *> Specifies the value
to be returned by SLAMCH
:
32 *> = 'E' or
'e', SLAMCH
:= eps
33 *> = 'S' or
's , SLAMCH := sfmin
34 *> = 'B
' or 'b
', SLAMCH := base
35 *> = 'P
' or 'p
', SLAMCH := eps*base
36 *> = 'N
' or 'n
', SLAMCH := t
37 *> = 'R
' or 'r
', SLAMCH := rnd
38 *> = 'M
' or 'm
', SLAMCH := emin
39 *> = 'U
' or 'u
', SLAMCH := rmin
40 *> = 'L
' or 'l
', SLAMCH := emax
41 *> = 'O
' or 'o
', SLAMCH := rmax
43 *> eps = relative machine precision
44 *> sfmin = safe minimum, such that 1/sfmin does not overflow
45 *> base = base of the machine
47 *> t = number of (base) digits in the mantissa
48 *> rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
49 *> emin = minimum exponent before (gradual) underflow
50 *> rmin = underflow threshold - base**(emin-1)
51 *> emax = largest exponent before overflow
52 *> rmax = overflow threshold - (base**emax)*(1-eps)
58 *> \author Univ. of Tennessee
59 *> \author Univ. of California Berkeley
60 *> \author Univ. of Colorado Denver
63 *> \date November 2011
65 *> \ingroup auxOTHERauxiliary
67 * =====================================================================
68 REAL FUNCTION SLAMCH( CMACH )
70 * -- LAPACK auxiliary routine (version 3.4.0) --
71 * -- LAPACK is a software package provided by Univ. of Tennessee, --
72 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
75 * .. Scalar Arguments ..
79 * =====================================================================
83 PARAMETER ( ONE = 1.0E+0, ZERO = 0.0E+0 )
86 REAL 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 *> SLAMC3 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
167 *> The values A and B.
171 REAL FUNCTION SLAMC3( A, B )
173 * -- LAPACK auxiliary routine (version 3.4.0) --
174 * Univ. of Tennessee, Univ. of California Berkeley and NAG Ltd..
177 * .. Scalar Arguments ..
180 * =====================================================================
182 * .. Executable Statements ..
192 ************************************************************************