/home/abui...lamchf77.f(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… NAME

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/INSTALL/slamchf77.f

Okay so bestie, that whole entire path is the name β€” no cap, that's the whole vibe. This is the manual page for slamchf77.f from LAPACK, living in the Library Functions Manual, filed under /home/abui...lamchf77.f(3). It's giving "I contain six whole routines that sniff out your machine's floating-point parameters" and honestly? Iconic. ✨


🌸 SYNOPSIS β€” the cast list 🌸

πŸŽ€ Functions/Subroutines πŸŽ€

  • real function SLAMCH (cmach) β€” the main character, does the actual parameter-determining πŸ’–
  • subroutine SLAMC1 (beta, t, rnd, ieee1) β€” supporting role, finds BETA, T, RND, IEEE1
  • subroutine SLAMC2 (beta, t, rnd, eps, emin, rmin, emax, rmax) β€” finds a whole pile of parameters
  • real function SLAMC3 (a, b) β€” tiny little helper that just… adds A and B, but dramatically
  • subroutine SLAMC4 (emin, start, base) β€” service routine for SLAMC2, does the EMIN math
  • subroutine SLAMC5 (beta, p, emin, ieee, emax, rmax) β€” out here hunting for RMAX without overflow

πŸ¦‹ Function/Subroutine Documentation πŸ¦‹

🧚 SLAMC1

subroutine SLAMC1 (integer beta, integer t, logical rnd, logical ieee1)

Purpose πŸ’–

SLAMC1 figures out the machine parameters that come out as BETA, T, RND and IEEE1. That's literally the whole job. Slay.

Parameters πŸŽ€

  • BETA β€” the base of the machine.
  • T β€” the number of ( BETA ) digits in the mantissa.
  • RND β€” tells you whether proper rounding ( RND = .TRUE. ) or chopping ( RND = .FALSE. ) happens in addition. Fr fr though, heads up: this may not be a reliable guide to the way in which the machine performs its arithmetic. So don't come for me if it's off πŸ™ˆ
  • IEEE1 β€” tells you whether rounding appears to be done in the IEEE 'round to nearest' style.

Author πŸ‘‘

LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..

Further Details πŸ”₯

Lowkey a whole heritage moment β€” this 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 206 of file slamchf77.f.


🧚 SLAMC2

subroutine SLAMC2 (integer beta, integer t, logical rnd, real eps, integer emin,
     real rmin, integer emax, real rmax)

Purpose πŸ’–

SLAMC2 determines the machine parameters specified in its argument list. All of them. Every single one. 🫢

Author πŸ‘‘

LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..

Parameters πŸŽ€

  • BETA β€” the base of the machine.
  • T β€” the number of ( BETA ) digits in the mantissa.
  • RND β€” specifies whether proper rounding ( RND = .TRUE. ) or chopping ( RND = .FALSE. ) occurs in addition. Again, this may not be a reliable guide to the way in which the machine performs its arithmetic. Not me repeating the warning, it's literally in the source okay 😭
  • EPS β€” the smallest positive number such that
fl( 1.0 - EPS ) .LT. 1.0,

where fl denotes the computed value.

  • EMIN β€” the minimum exponent before (gradual) underflow occurs.
  • RMIN β€” the smallest normalized number for the machine, given by BASE**( EMIN - 1 ), where BASE is the floating point value of BETA.
  • EMAX β€” the maximum exponent before overflow occurs.
  • 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. Respect the lineage πŸ’œ

Definition at line 418 of file slamchf77.f.


🧚 SLAMC3

real function SLAMC3 (real a, real b)

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. It's giving "I'm here to stop the optimizer from being too clever." Main character energy for a two-line addition, honestly. πŸ’€

Author πŸ‘‘

LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..

Parameters πŸŽ€

  • A β€” (no description, it's just vibes and an empty line 🫠)
  • B β€” the values A and B.

Purpose (yes, again) πŸ’–

And because the docs said "encore", here it is one more time: 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. Not me copy-pasting β€” they did, bestie.

Parameters (also again) πŸŽ€

  • A
  • B β€” the values A and B.

Definition at line 170 of file slamch.f. (note: slamch.f, not slamchf77.f β€” keeping it accurate πŸŽ€)


🧚 SLAMC4

subroutine SLAMC4 (integer emin, real start, integer base)

Purpose πŸ’–

SLAMC4 is a service routine for SLAMC2. Just out here doing the support work with zero credit β€” we see you, bestie. 🌸

Parameters πŸŽ€

  • EMIN β€” the minimum exponent before (gradual) underflow, computed by setting A = START and dividing by BASE until the previous A can not be recovered.
  • START β€” the starting point for determining EMIN.
  • BASE β€” the base of the machine.

Definition at line 688 of file slamchf77.f.


🧚 SLAMC5

subroutine SLAMC5 (integer beta, integer p, integer emin, logical ieee,
     integer emax, real rmax)

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.

⚠️ Heads up bestie, 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. So like… know your machine, okay? 😭

Parameters πŸŽ€

  • BETA β€” the base of floating-point arithmetic.
  • P β€” the number of base BETA digits in the mantissa of a floating-point value.
  • EMIN β€” the minimum exponent before (gradual) underflow.
  • IEEE β€” a logical flag specifying whether or not the arithmetic system is thought to comply with the IEEE standard.
  • EMAX β€” the largest exponent before overflow.
  • RMAX β€” the largest machine floating-point number.

Definition at line 796 of file slamchf77.f.


πŸ‘‘ SLAMCH β€” the actual headliner πŸ‘‘

real function SLAMCH (character cmach)

SLAMCH SLAMCHF77 deprecated 🚨 β€” yes she's deprecated, we still love her, but note it fr fr.

Purpose πŸ’–

SLAMCH determines single precision machine parameters. Simple as that, and yet so much power.

Parameters πŸŽ€

CMACH is CHARACTER*1. Here's the whole menu, verbatim, because accuracy is the vibe:

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)

(Yes, 's , is written like that in the original. Leaving it exactly as found, don't @ me πŸ’…)

Author πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Purpose (the sequel) πŸ’–

SLAMCH determines single precision machine parameters. Same sentence, second time. We love consistency. 🌈

Parameters (the sequel) πŸŽ€

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)

Author (the sequel) πŸ‘‘

  • Univ. of Tennessee
  • Univ. of California Berkeley
  • Univ. of Colorado Denver
  • NAG Ltd.

Definition at line 67 of file slamch.f.


🌟 Author 🌟

Generated automatically by Doxygen for LAPACK from the source code. (Not written by a human hand, just Doxygen doing Doxygen things 🫢)


And that's the whole page, bestie! πŸ’œ LAPACK, Version 3.12.0, brought to you by /home/abui...lamchf77.f(3) β€” go forth and know your machine's floating-point parameters βœ¨πŸŽ€πŸ¦‹

πŸ“¦ where this page comes from