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

DLAMCH

DLAMCHF77 deprecated

Purpose:
` DLAMCH 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)```
Date
November 2015
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)```
Date
April 2012

Definition at line 65 of file dlamch.f.

65 *
66 * -- LAPACK auxiliary routine (version 3.6.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 * November 2015
70 *
71 * .. Scalar Arguments ..
72  CHARACTER cmach
73 * ..
74 *
75 * =====================================================================
76 *
77 * .. Parameters ..
78  DOUBLE PRECISION one, zero
79  parameter ( one = 1.0d+0, zero = 0.0d+0 )
80 * ..
81 * .. Local Scalars ..
82  DOUBLE PRECISION rnd, eps, sfmin, small, rmach
83 * ..
84 * .. External Functions ..
85  LOGICAL lsame
86  EXTERNAL lsame
87 * ..
88 * .. Intrinsic Functions ..
89  INTRINSIC digits, epsilon, huge, maxexponent,
91 * ..
92 * .. Executable Statements ..
93 *
94 *
95 * Assume rounding, not chopping. Always.
96 *
97  rnd = one
98 *
99  IF( one.EQ.rnd ) THEN
100  eps = epsilon(zero) * 0.5
101  ELSE
102  eps = epsilon(zero)
103  END IF
104 *
105  IF( lsame( cmach, 'E' ) ) THEN
106  rmach = eps
107  ELSE IF( lsame( cmach, 'S' ) ) THEN
108  sfmin = tiny(zero)
109  small = one / huge(zero)
110  IF( small.GE.sfmin ) THEN
111 *
112 * Use SMALL plus a bit, to avoid the possibility of rounding
113 * causing overflow when computing 1/sfmin.
114 *
115  sfmin = small*( one+eps )
116  END IF
117  rmach = sfmin
118  ELSE IF( lsame( cmach, 'B' ) ) THEN
120  ELSE IF( lsame( cmach, 'P' ) ) THEN
121  rmach = eps * radix(zero)
122  ELSE IF( lsame( cmach, 'N' ) ) THEN
123  rmach = digits(zero)
124  ELSE IF( lsame( cmach, 'R' ) ) THEN
125  rmach = rnd
126  ELSE IF( lsame( cmach, 'M' ) ) THEN
127  rmach = minexponent(zero)
128  ELSE IF( lsame( cmach, 'U' ) ) THEN
129  rmach = tiny(zero)
130  ELSE IF( lsame( cmach, 'L' ) ) THEN
131  rmach = maxexponent(zero)
132  ELSE IF( lsame( cmach, 'O' ) ) THEN
133  rmach = huge(zero)
134  ELSE
135  rmach = zero
136  END IF
137 *
138  dlamch = rmach
139  RETURN
140 *
141 * End of DLAMCH
142 *
double precision function dlamch(CMACH)
DLAMCH
Definition: dlamch.f:65
logical function lsame(CA, CB)
LSAME
Definition: lsame.f:55

Here is the caller graph for this function: