PDLABAD(l)

πŸ“¦ version 1.5, in ubuntu jammy

✨ PDLABAD ✨

okay bestie, gather round, because we're about to talk about the LAPACK auxiliary routine PDLABAD and honestly? she's a little legend. this is from the LAPACK crew, version 1.5, and she's out here doing damage control on your floating point numbers. πŸ’…


πŸŽ€ NAME πŸŽ€

PDLABAD takes the underflow and overflow values that PDLAMCH already computed for you, and hands back the square root of each one β€” but only if the log of LARGE is sufficiently large. no cap. πŸ¦‹


🌸 SYNOPSIS 🌸

SUBROUTINE PDLABAD( ICTXT, SMALL, LARGE )

    INTEGER         ICTXT

    DOUBLE          PRECISION LARGE, SMALL

πŸ’– PURPOSE πŸ’–

so here's the tea. PDLABAD takes the values that PDLAMCH spat out for underflow and overflow, and it returns the square root of each of those values if the log of LARGE is sufficiently large. that's the whole vibe check right there.

why would you want that, you ask? because this subroutine is literally designed to identify machines with a large exponent range β€” think the Crays, the big girls πŸ‘‘ β€” and then redefine the underflow and overflow limits to be the square roots of whatever PDLAMCH computed. iconic behavior.

and the reason she has to exist at all? because PDLAMCH does not compensate for poor arithmetic in the upper half of the exponent range, which is exactly the situation you find on a Cray. so yeah, someone had to step up. 🫢

on top of all that, this routine also performs a global minimization and maximization on these values, which is what lets it support heterogeneous computing networks. multi-machine girlbossing, fr fr. 🌈


⭐ ARGUMENTS ⭐

  • ICTXT (global input) INTEGER β€” the BLACS context handle in which the computation takes place. that's the group chat this whole thing is happening in. πŸ’¬
  • SMALL (local input/local output) DOUBLE PRECISION β€” on entry, the underflow threshold as computed by PDLAMCH. on exit: if LOG10(LARGE) is sufficiently large, you get the square root of SMALL; otherwise it stays unchanged. no notes. ✨
  • LARGE (local input/local output) DOUBLE PRECISION β€” on entry, the overflow threshold as computed by PDLAMCH. on exit: if LOG10(LARGE) is sufficiently large, you get the square root of LARGE; otherwise it stays unchanged. periodt. πŸ’…
⚠️ heads up bestie: both SMALL and LARGE are local input/local output β€” so they get read and rewritten in place. don't be surprised when they come back different. 😭

and that's the whole page, bestie!! this one's a LAPACK auxiliary routine, version 1.5, dated 12 May 1997 β€” so she's vintage, she's got main character energy, and she's still out here fixing Cray arithmetic. we love her for it. mwah. πŸ’– πŸŽ€ πŸ¦‹ ✨

πŸ“¦ where this page comes from