PDLABAD(l)
β¨ 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 byPDLAMCH. on exit: ifLOG10(LARGE)is sufficiently large, you get the square root ofSMALL; otherwise it stays unchanged. no notes. β¨LARGE(local input/local output)DOUBLE PRECISIONβ on entry, the overflow threshold as computed byPDLAMCH. on exit: ifLOG10(LARGE)is sufficiently large, you get the square root ofLARGE; otherwise it stays unchanged. periodt. π
β οΈ heads up bestie: bothSMALLandLARGEare 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
- 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