next up previous contents index
Next: LAPACK Up: LAPACK95 Previous: Optimal Value of the   Contents   Index


Machine Dependent Constants (Function LA_LAMCH)

LAPACK95 provides a function, LA_LAMCH, that returns the values of the machine constants listed in Table 1.1. LA_LAMCH computes these constants the first time it is called in a run. For performance testing, this initial cost can be hidden by including a call to LA_LAMCH in the main program before any calls to the routines that are to be timed.

Table 1.1: Machine constants returned by LA_LAMCH
Argument Constant returned
'E' or 'e' eps: relative machine precision
'S' or 's' sfmin: safe minimum, such that 1/sfmin does not overflow
'B' or 'b' base: base of the machine
'P' or 'p' prec: eps$\times$base
'N' or 'n' t: number of (base) digits in the mantissa
'R' or 'r' rnd: 1.0 when rounding occurs in addition, 0.0 otherwise
'M' or 'm' emin: minimum exponent before (gradual) underflow
'U' or 'u' rmin: underflow threshold - base $^{\mathit{emin}-1}$
'L' or 'l' emax: largest exponent before overflow
'O' or 'o' rmax: overflow threshold - base $^{\mathit{emax}}\times$(1-eps)

A cleaner, but less portable, alternative is for the installer to save the values computed by LA_LAMCH for a specific machine and create a new version of LA_LAMCH with these constants set in DATA statements, taking care that no accuracy is lost in the translation.
The code of LA_LAMCH is listed in Section 3.8.3.


next up previous contents index
Next: LAPACK Up: LAPACK95 Previous: Optimal Value of the   Contents   Index
Susan Blackford 2001-08-19