![]() |
LAPACK
3.5.0
LAPACK: Linear Algebra PACKage
|
Go to the source code of this file.
Functions/Subroutines | |
| real function | slamch (CMACH) |
| SLAMCHF77 deprecated More... | |
| subroutine | slamc1 (BETA, T, RND, IEEE1) |
| SLAMC1 More... | |
| subroutine | slamc2 (BETA, T, RND, EPS, EMIN, RMIN, EMAX, RMAX) |
| SLAMC2 More... | |
| real function | slamc3 (A, B) |
| SLAMC3 More... | |
| subroutine | slamc4 (EMIN, START, BASE) |
| SLAMC4 More... | |
| subroutine | slamc5 (BETA, P, EMIN, IEEE, EMAX, RMAX) |
| SLAMC5 More... | |
| subroutine slamc1 | ( | integer | BETA, |
| integer | T, | ||
| logical | RND, | ||
| logical | IEEE1 | ||
| ) |
SLAMC1
Purpose:
SLAMC1 determines the machine parameters given by BETA, T, RND, and IEEE1.
| [out] | BETA | The base of the machine. |
| [out] | T | The number of ( BETA ) digits in the mantissa. |
| [out] | RND | Specifies whether proper rounding ( RND = .TRUE. ) or
chopping ( RND = .FALSE. ) occurs in addition. This may not
be a reliable guide to the way in which the machine performs
its arithmetic. |
| [out] | IEEE1 | Specifies whether rounding appears to be done in the IEEE
'round to nearest' style. |
Further Details
The routine is based on the routine ENVRON by Malcolm and
incorporates suggestions by Gentleman and Marovich. See
Malcolm M. A. (1972) Algorithms to reveal properties of
floating-point arithmetic. Comms. of the ACM, 15, 949-951.
Gentleman W. M. and Marovich S. B. (1974) More on algorithms
that reveal properties of floating point arithmetic units.
Comms. of the ACM, 17, 276-277.
Definition at line 210 of file slamchf77.f.
| subroutine slamc2 | ( | integer | BETA, |
| integer | T, | ||
| logical | RND, | ||
| real | EPS, | ||
| integer | EMIN, | ||
| real | RMIN, | ||
| integer | EMAX, | ||
| real | RMAX | ||
| ) |
SLAMC2
Purpose:
SLAMC2 determines the machine parameters specified in its argument list.
| [out] | BETA | The base of the machine. |
| [out] | T | The number of ( BETA ) digits in the mantissa. |
| [out] | RND | Specifies whether proper rounding ( RND = .TRUE. ) or
chopping ( RND = .FALSE. ) occurs in addition. This may not
be a reliable guide to the way in which the machine performs
its arithmetic. |
| [out] | EPS | The smallest positive number such that
fl( 1.0 - EPS ) .LT. 1.0,
where fl denotes the computed value. |
| [out] | EMIN | The minimum exponent before (gradual) underflow occurs. |
| [out] | RMIN | The smallest normalized number for the machine, given by
BASE**( EMIN - 1 ), where BASE is the floating point value
of BETA. |
| [out] | EMAX | The maximum exponent before overflow occurs. |
| [out] | RMAX | The largest positive number for the machine, given by
BASE**EMAX * ( 1 - EPS ), where BASE is the floating point
value of BETA. |
Further Details
The computation of EPS is based on a routine PARANOIA by W. Kahan of the University of California at Berkeley.
Definition at line 423 of file slamchf77.f.
| real function slamc3 | ( | real | A, |
| real | B | ||
| ) |
SLAMC3
Purpose:
SLAMC3 is intended to force A and B to be stored prior to doing the addition of A and B , for use in situations where optimizers might hold one of these in a register.
| [in] | A | |
| [in] | B | The values A and B. |
Definition at line 646 of file slamchf77.f.
| subroutine slamc4 | ( | integer | EMIN, |
| real | START, | ||
| integer | BASE | ||
| ) |
SLAMC4
Purpose:
SLAMC4 is a service routine for SLAMC2.
| [out] | EMIN | The minimum exponent before (gradual) underflow, computed by
setting A = START and dividing by BASE until the previous A
can not be recovered. |
| [in] | START | The starting point for determining EMIN. |
| [in] | BASE | The base of the machine. |
Definition at line 693 of file slamchf77.f.
| subroutine slamc5 | ( | integer | BETA, |
| integer | P, | ||
| integer | EMIN, | ||
| logical | IEEE, | ||
| integer | EMAX, | ||
| real | RMAX | ||
| ) |
SLAMC5
Purpose:
SLAMC5 attempts to compute RMAX, the largest machine floating-point number, without overflow. It assumes that EMAX + abs(EMIN) sum approximately to a power of 2. It will fail on machines where this assumption does not hold, for example, the Cyber 205 (EMIN = -28625, EMAX = 28718). It will also fail if the value supplied for EMIN is too large (i.e. too close to zero), probably with overflow.
| [in] | BETA | The base of floating-point arithmetic. |
| [in] | P | The number of base BETA digits in the mantissa of a
floating-point value. |
| [in] | EMIN | The minimum exponent before (gradual) underflow. |
| [in] | IEEE | A logical flag specifying whether or not the arithmetic
system is thought to comply with the IEEE standard. |
| [out] | EMAX | The largest exponent before overflow |
| [out] | RMAX | The largest machine floating-point number. |
Definition at line 801 of file slamchf77.f.
| real function slamch | ( | character | CMACH | ) |
SLAMCHF77 deprecated
SLAMCH determines single precision machine parameters.
| [in] | CMACH | Specifies the value to be returned by SLAMCH:
= 'E' or 'e', SLAMCH := eps
= 'S' or 's , SLAMCH := sfmin
= 'B' or 'b', SLAMCH := base
= 'P' or 'p', SLAMCH := eps*base
= 'N' or 'n', SLAMCH := t
= 'R' or 'r', SLAMCH := rnd
= 'M' or 'm', SLAMCH := emin
= 'U' or 'u', SLAMCH := rmin
= 'L' or 'l', SLAMCH := emax
= 'O' or 'o', SLAMCH := 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) |
Definition at line 68 of file slamchf77.f.