1HPL_dlamch(3)                HPL Library Functions               HPL_dlamch(3)
2
3
4

NAME

6       HPL_dlamch - determines machine-specific arithmetic constants.
7

SYNOPSIS

9       #include "hpl.h"
10
11       double HPL_dlamch( const HPL_T_MACH CMACH );
12

DESCRIPTION

14       HPL_dlamch  determines   machine-specific  arithmetic constants such as
15       the relative machine precision  (eps),  the safe minimum  (sfmin)  such
16       that  1  / sfmin does not overflow, the base of the machine (base), the
17       precision (prec), the  number of (base) digits  in the   mantissa  (t),
18       whether  rounding  occurs in addition (rnd=1.0 and 0.0 otherwise),  the
19       minimum exponent before  (gradual)  underflow (emin),   the   underflow
20       threshold  (rmin)  base**(emin-1), the largest exponent before overflow
21       (emax), the overflow threshold (rmax) (base**emax)*(1-eps).
22

ARGUMENTS

24       CMACH   (local input)           const HPL_T_MACH
25               Specifies the value to be returned by HPL_dlamch
26                  = HPL_MACH_EPS,   HPL_dlamch := eps (default)
27                  = HPL_MACH_SFMIN, HPL_dlamch := sfmin
28                  = HPL_MACH_BASE,  HPL_dlamch := base
29                  = HPL_MACH_PREC,  HPL_dlamch := eps*base
30                  = HPL_MACH_MLEN,  HPL_dlamch := t
31                  = HPL_MACH_RND,   HPL_dlamch := rnd
32                  = HPL_MACH_EMIN,  HPL_dlamch := emin
33                  = HPL_MACH_RMIN,  HPL_dlamch := rmin
34                  = HPL_MACH_EMAX,  HPL_dlamch := emax
35                  = HPL_MACH_RMAX,  HPL_dlamch := rmax
36
37               where
38
39                  eps   = relative machine precision,
40                  sfmin = safe minimum,
41                  base  = base of the machine,
42                  prec  = eps*base,
43                  t     = number of digits in the mantissa,
44                  rnd   = 1.0 if rounding occurs in addition,
45                  emin  = minimum exponent before underflow,
46                  rmin  = underflow threshold,
47                  emax  = largest exponent before overflow,
48                  rmax  = overflow threshold.
49

EXAMPLE

51       #include "hpl.h"
52
53       int main(int argc, char *argv[])
54       {
55          double eps;
56          eps = HPL_dlamch( HPL_MACH_EPS );
57          printf("eps=%18.8e\n", eps);
58          exit(0); return(0);
59       }
60

REFERENCES

62       This function has been manually translated from the Fortran  77  LAPACK
63       auxiliary  function  dlamch.f  (version 2.0 -- 1992), that  was  itself
64       based on the function ENVRON  by Malcolm and  incorporated  suggestions
65       by Gentleman and Marovich. See
66
67       Malcolm  M.  A.,  Algorithms  to  reveal  properties  of floating-point
68       arithmetic.,  Comms. of the ACM, 15, 949-951 (1972).
69
70       Gentleman W. M. and Marovich S. B.,  More  on algorithms   that  reveal
71       properties  of   floating point arithmetic units.,  Comms. of  the ACM,
72       17, 276-277 (1974).
73
74
75
76HPL 2.1                        October 26, 2012                  HPL_dlamch(3)
Impressum