PSLAMCH(l)
β¨ 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
- ubuntu jammy: scalapack-doc 1.5-11
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash on : a language model's rewrite of the original, under its terms