LAPACK  3.7.0
LAPACK: Linear Algebra PACKage
double precision function dlamch ( character  CMACH)

DLAMCHF77 deprecated

Purpose:
 DLAMCHF77 determines double precision machine parameters.
Parameters
[in]CMACH
          Specifies the value to be returned by DLAMCH:
          = 'E' or 'e',   DLAMCH := eps
          = 'S' or 's ,   DLAMCH := sfmin
          = 'B' or 'b',   DLAMCH := base
          = 'P' or 'p',   DLAMCH := eps*base
          = 'N' or 'n',   DLAMCH := t
          = 'R' or 'r',   DLAMCH := rnd
          = 'M' or 'm',   DLAMCH := emin
          = 'U' or 'u',   DLAMCH := rmin
          = 'L' or 'l',   DLAMCH := emax
          = 'O' or 'o',   DLAMCH := rmax
          where
          eps   = relative machine precision
          sfmin = safe minimum, such that 1/sfmin does not overflow
          base  = base of the machine
          prec  = eps*base
          t     = number of (base) digits in the mantissa
          rnd   = 1.0 when rounding occurs in addition, 0.0 otherwise
          emin  = minimum exponent before (gradual) underflow
          rmin  = underflow threshold - base**(emin-1)
          emax  = largest exponent before overflow
          rmax  = overflow threshold  - (base**emax)*(1-eps)
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Date
April 2012

Definition at line 65 of file dlamchf77.f.

65 *
66 * -- LAPACK auxiliary routine (version 3.7.0) --
67 * -- LAPACK is a software package provided by Univ. of Tennessee, --
68 * -- Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..--
69 * April 2012
70 *
71 * .. Scalar Arguments ..
72  CHARACTER cmach
73 * ..
74 * .. Parameters ..
75  DOUBLE PRECISION one, zero
76  parameter ( one = 1.0d+0, zero = 0.0d+0 )
77 * ..
78 * .. Local Scalars ..
79  LOGICAL first, lrnd
80  INTEGER beta, imax, imin, it
81  DOUBLE PRECISION base, emax, emin, eps, prec, rmach, rmax, rmin,
82  $ rnd, sfmin, small, t
83 * ..
84 * .. External Functions ..
85  LOGICAL lsame
86  EXTERNAL lsame
87 * ..
88 * .. External Subroutines ..
89  EXTERNAL dlamc2
90 * ..
91 * .. Save statement ..
92  SAVE first, eps, sfmin, base, t, rnd, emin, rmin,
93  $ emax, rmax, prec
94 * ..
95 * .. Data statements ..
96  DATA first / .true. /
97 * ..
98 * .. Executable Statements ..
99 *
100  IF( first ) THEN
101  CALL dlamc2( beta, it, lrnd, eps, imin, rmin, imax, rmax )
102  base = beta
103  t = it
104  IF( lrnd ) THEN
105  rnd = one
106  eps = ( base**( 1-it ) ) / 2
107  ELSE
108  rnd = zero
109  eps = base**( 1-it )
110  END IF
111  prec = eps*base
112  emin = imin
113  emax = imax
114  sfmin = rmin
115  small = one / rmax
116  IF( small.GE.sfmin ) THEN
117 *
118 * Use SMALL plus a bit, to avoid the possibility of rounding
119 * causing overflow when computing 1/sfmin.
120 *
121  sfmin = small*( one+eps )
122  END IF
123  END IF
124 *
125  IF( lsame( cmach, 'E' ) ) THEN
126  rmach = eps
127  ELSE IF( lsame( cmach, 'S' ) ) THEN
128  rmach = sfmin
129  ELSE IF( lsame( cmach, 'B' ) ) THEN
130  rmach = base
131  ELSE IF( lsame( cmach, 'P' ) ) THEN
132  rmach = prec
133  ELSE IF( lsame( cmach, 'N' ) ) THEN
134  rmach = t
135  ELSE IF( lsame( cmach, 'R' ) ) THEN
136  rmach = rnd
137  ELSE IF( lsame( cmach, 'M' ) ) THEN
138  rmach = emin
139  ELSE IF( lsame( cmach, 'U' ) ) THEN
140  rmach = rmin
141  ELSE IF( lsame( cmach, 'L' ) ) THEN
142  rmach = emax
143  ELSE IF( lsame( cmach, 'O' ) ) THEN
144  rmach = rmax
145  END IF
146 *
147  dlamch = rmach
148  first = .false.
149  RETURN
150 *
151 * End of DLAMCH
152 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
subroutine dlamc2(BETA, T, RND, EPS, EMIN, RMIN, EMAX, RMAX)
DLAMC2
Definition: dlamchf77.f:420
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the call graph for this function: