SCALAPACK 2.2.2
LAPACK: Linear Algebra PACKage
Loading...
Searching...
No Matches
pdlamch.f
Go to the documentation of this file.
1 DOUBLE PRECISION FUNCTION pdlamch( ICTXT, CMACH )
2*
3* -- ScaLAPACK auxiliary routine (version 1.7) --
4* University of Tennessee, Knoxville, Oak Ridge National Laboratory,
5* and University of California, Berkeley.
6* May 1, 1997
7*
8* .. Scalar Arguments ..
9 CHARACTER cmach
10 INTEGER ictxt
11* ..
12*
13* Purpose
14* =======
15*
16* PDLAMCH determines double precision machine parameters.
17*
18* Arguments
19* =========
20*
21* ICTXT (global input) INTEGER
22* The BLACS context handle in which the computation takes
23* place.
24*
25* CMACH (global input) CHARACTER*1
26* Specifies the value to be returned by PDLAMCH:
27* = 'E' or 'e', PDLAMCH := eps
28* = 'S' or 's , PDLAMCH := sfmin
29* = 'B' or 'b', PDLAMCH := base
30* = 'P' or 'p', PDLAMCH := eps*base
31* = 'N' or 'n', PDLAMCH := t
32* = 'R' or 'r', PDLAMCH := rnd
33* = 'M' or 'm', PDLAMCH := emin
34* = 'U' or 'u', PDLAMCH := rmin
35* = 'L' or 'l', PDLAMCH := emax
36* = 'O' or 'o', PDLAMCH := rmax
37*
38* where
39*
40* eps = relative machine precision
41* sfmin = safe minimum, such that 1/sfmin does not overflow
42* base = base of the machine
43* prec = eps*base
44* t = number of (base) digits in the mantissa
45* rnd = 1.0 when rounding occurs in addition, 0.0 otherwise
46* emin = minimum exponent before (gradual) underflow
47* rmin = underflow threshold - base**(emin-1)
48* emax = largest exponent before overflow
49* rmax = overflow threshold - (base**emax)*(1-eps)
50*
51* =====================================================================
52*
53* .. Local Scalars ..
54 INTEGER idumm
55 DOUBLE PRECISION temp
56* ..
57* .. External Subroutines ..
58 EXTERNAL dgamn2d, dgamx2d
59* ..
60* .. External Functions ..
61 LOGICAL lsame
62 DOUBLE PRECISION dlamch
63 EXTERNAL dlamch, lsame
64* ..
65* .. Executable Statements ..
66*
67 temp = dlamch( cmach )
68 idumm = 0
69*
70 IF( lsame( cmach, 'E' ).OR.lsame( cmach, 'S' ).OR.
71 $ lsame( cmach, 'M' ).OR.lsame( cmach, 'U' ) ) THEN
72 CALL dgamx2d( ictxt, 'All', ' ', 1, 1, temp, 1, idumm,
73 $ idumm, -1, -1, idumm )
74 ELSE IF( lsame( cmach, 'L' ).OR.lsame( cmach, 'O' ) ) THEN
75 CALL dgamn2d( ictxt, 'All', ' ', 1, 1, temp, 1, idumm,
76 $ idumm, -1, -1, idumm )
77 END IF
78*
79 pdlamch = temp
80*
81* End of PDLAMCH
82*
83 END
double precision function pdlamch(ictxt, cmach)
Definition pdblastst.f:6769
logical function lsame(ca, cb)
Definition tools.f:1724
double precision function dlamch(cmach)
Definition tools.f:10