PSLAMCH(l)

πŸ“¦ version 1.5, in ubuntu jammy

✨ PSLAMCH ✨

okay bestie, gather round πŸ’– this one's a LAPACK auxiliary routine (we're living in version 1.5 era, the manual page lives in section l) and it's literally just here to tell you what your machine's single precision numbers are like. no cap.


🌸 NAME 🌸

PSLAMCH β€” figure out the single precision machine parameters. that's the whole job. she's a one-trick pony and she ate. πŸ‘‘


πŸ¦‹ SYNOPSIS πŸ¦‹

REAL FUNCTION PSLAMCH( ICTXT, CMACH )

    CHARACTER CMACH

    INTEGER   ICTXT

so you call her with two things and she hands you back a REAL. simple as. ✨


πŸ’… PURPOSE πŸ’…

PSLAMCH determines single precision machine parameters. periodt. that's it, that's the purpose, she is not doing anything else today.


πŸŽ€ ARGUMENTS πŸŽ€

  • ICTXT (global input) INTEGER β€” the BLACS context handle where the computation takes place. it's giving "which little crew of processes are we doing this with". 🫢
  • CMACH (global input) CHARACTER*1 β€” this is the lil letter that tells her which value you want back:
= 'E' or 'e',   PSLAMCH := eps
= 'S' or 's ,   PSLAMCH := sfmin
= 'B' or 'b',   PSLAMCH := base
= 'P' or 'p',   PSLAMCH := eps*base
= 'N' or 'n',   PSLAMCH := t
= 'R' or 'r',   PSLAMCH := rnd
= 'M' or 'm',   PSLAMCH := emin
= 'U' or 'u',   PSLAMCH := rmin
= 'L' or 'l',   PSLAMCH := emax
= 'O' or 'o',   PSLAMCH := rmax
not me side-eyeing that 's that never got its closing quote 😭 we are keeping it EXACTLY as the ancestors wrote it, no edits, no notes, respect the lore.

and where all those lil symbols mean:

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)

like, eps is your relative machine precision (the tiny wisp 🧚), sfmin is the safe minimum where 1/sfmin still refuses to overflow, base is the machine's base, prec is eps*base, t is how many base-digits fit in the mantissa, rnd is 1.0 when rounding happens in addition and 0.0 otherwise, emin is the minimum exponent before (gradual) underflow, rmin is the underflow threshold base**(emin-1), emax is the largest exponent before overflow, and rmax is the overflow threshold (base**emax)*(1-eps). slay. πŸ’–


that's the whole page, bestie, go forth and vibe check your floating point 🌈

source + version tea: this is LAPACK version 1.5, and the page is dated 12 May 1997 β€” yes she's vintage, yes she still serves, iconic behavior honestly πŸ’œ

πŸ“¦ where this page comes from