/home/abui...lamchf77.f(3)
π
/home/abui...lamchf77.f(3)
okay bestie so this one is from the Library Functions Manual and it's the whole dlamchf77.f situation β a little Fortran family of subroutines that go sniffing around your machine to figure out how its floating-point arithmetic actually behaves π§β¨. Basically a vibe check for your hardware, but for numbers.
β¨ NAME β¨
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/INSTALL/dlamchf77.f
no cap, that's the whole name π it's literally a file path. iykyk β some man pages just are a path.
πΈ SYNOPSIS πΈ
Functions/Subroutines
double precision function DLAMCH (cmach)
DLAMCH
subroutine DLAMC1 (beta, t, rnd, ieee1)
DLAMC1
subroutine DLAMC2 (beta, t, rnd, eps, emin, rmin, emax, rmax)
DLAMC2
double precision function DLAMC3 (a, b)
DLAMC3
subroutine DLAMC4 (emin, start, base)
DLAMC4
subroutine DLAMC5 (beta, p, emin, ieee, emax, rmax)
DLAMC5
six little icons, all in one file π«Ά
π Function/Subroutine Documentation π
π subroutine DLAMC1 (integer beta, integer t, logical rnd, logical ieee1)
DLAMC1 Purpose:
DLAMC1 determines the machine parameters given by BETA, T, RND, and IEEE1.
she's the detective of the group π β goes and figures out four whole machine parameters for you.
Parameters
BETAβ the base of the machine. no notes.Tβ how many (BETA) digits fit in the mantissa.RNDβ tells you whether proper rounding (RND = .TRUE.) or chopping (RND = .FALSE.) happens in addition. and lowkey it says right there that this may not be a reliable guide to how the machine actually performs its arithmetic π so don't come for her if it's a lil off.IEEE1β a logical flag for 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
The routine is based on the routine ENVRON by Malcolm and incorporates suggestions by Gentleman and Marovich. SeeMalcolm 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.
scholarly queen π citing her sources and everything.
Definition at line 207 of file dlamchf77.f.
π¦ subroutine DLAMC2 (integer beta, integer t, logical rnd, double precision eps, integer emin, double precision rmin, integer emax, double precision rmax)
DLAMC2 Purpose:
DLAMC2 determines the machine parameters specified in its argument list.
like DLAMC1 but with a way bigger argument list, she's doing the most and we love her for it π
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β proper rounding (RND = .TRUE.) vs chopping (RND = .FALSE.) in addition. same caveat as before: this may not be a reliable guide to the way in which the machine performs its arithmetic.EPSβ the smallest positive number such that
fl( 1.0 - EPS ) .LT. 1.0,
where fl denotes the computed value. tiny but mighty π
EMINβ the minimum exponent before (gradual) underflow occurs.RMINβ the smallest normalized number for the machine, given byBASE**( EMIN - 1 ), whereBASEis the floating point value ofBETA.EMAXβ the maximum exponent before overflow occurs.RMAXβ the largest positive number for the machine, given byBASE**EMAX * ( 1 - EPS ), whereBASEis the floating point value ofBETA.
Further Details
The computation of EPS is based on a routine PARANOIA by W. Kahan of the University of California at Berkeley.
PARANOIA is honestly such a name, main character energy fr fr π
Definition at line 418 of file dlamchf77.f.
π double precision function DLAMC3 (double precision a, double precision b)
DLAMC3 Purpose:
DLAMC3 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.
she's the anti-optimizer icon β a whole routine whose job is to make sure your compiler doesn't get cute and keep stuff in a register.
Author
LAPACK is a software package provided by Univ. of Tennessee, Univ. of California Berkeley, Univ. of Colorado Denver and NAG Ltd..
Parameters
AβA is a DOUBLE PRECISIONBβB is a DOUBLE PRECISION, and also:The values A and B.
Purpose:
DLAMC3 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.
(yes bestie, the purpose is listed twice on this page. the docs said it twice so i said it twice. no i will not be taking questions π«Ά)
Parameters
AB
The values A and B.
Definition at line 171 of file dlamch.f.
β οΈ heads up: that'sdlamch.f, notdlamchf77.f. she's visiting from the other file. keep the receipt.
π§ subroutine DLAMC4 (integer emin, double precision start, integer base)
DLAMC4 Purpose:
DLAMC4 is a service routine for DLAMC2.
supportive bestie role π someone's gotta do it.
Parameters
EMINβ the minimum exponent before (gradual) underflow, computed by settingA = STARTand dividing byBASEuntil the previousAcan not be recovered.STARTβ the starting point for determiningEMIN.BASEβ the base of the machine.
Definition at line 688 of file dlamchf77.f.
β subroutine DLAMC5 (integer beta, integer p, integer emin, logical ieee, integer emax, double precision rmax)
DLAMC5 Purpose:
DLAMC5 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. 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.
π okay so this one openly admits she can fail. two whole failure modes, spelled out. the Cyber 205 numbers are right there:EMIN = -28625,EMAX = 28718. and if you hand her anEMINthat's too large (i.e. too close to zero) she'll probably overflow. not subtle, not sorry, at least she told you.
Parameters
BETAβ the base of floating-point arithmetic.Pβ the number of baseBETAdigits 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 overflowRMAXβ the largest machine floating-point number.
Definition at line 795 of file dlamchf77.f.
π double precision function DLAMCH (character cmach)
DLAMCH DLAMCHF77 deprecated
yes. deprecated. it's literally in the heading. read it and weep π this is the f77 one, the legacy icon, she's still serving but she's officially marked.
Purpose:
DLAMCH determines double precision machine parameters.
Parameters
CMACHβCMACH is CHARACTER*1, and it specifies the value to be returned byDLAMCH:
= 'E' or 'e', DLAMCH := eps
= 'S' or 's , DLAMCH := sfmin
= 'B' or 'b', DLAMCH := base
= 'P' or 'p', DLAMCH := eps*base
= 'N' or 'n', DLAMCH := t
= 'R' or 'r', DLAMCH := rnd
= 'M' or 'm', DLAMCH := emin
= 'U' or 'u', DLAMCH := rmin
= 'L' or 'l', DLAMCH := emax
= 'O' or 'o', DLAMCH := 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)
β οΈ one char, one flag, ten possible answers. get the letter wrong and you get a whole different number back, so spell it right bestie.
Author
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Purpose:
DLAMCHF77 determines double precision machine parameters.
(same purpose, now under the DLAMCHF77 name. she contains multitudes β¨)
Parameters
CMACHβ specifies the value to be returned byDLAMCH:
= 'E' or 'e', DLAMCH := eps
= 'S' or 's , DLAMCH := sfmin
= 'B' or 'b', DLAMCH := base
= 'P' or 'p', DLAMCH := eps*base
= 'N' or 'n', DLAMCH := t
= 'R' or 'r', DLAMCH := rnd
= 'M' or 'm', DLAMCH := emin
= 'U' or 'u', DLAMCH := rmin
= 'L' or 'l', DLAMCH := emax
= 'O' or 'o', DLAMCH := 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
Univ. of Tennessee
Univ. of California Berkeley
Univ. of Colorado Denver
NAG Ltd.
Definition at line 68 of file dlamch.f.
π» Author π»
Generated automatically by Doxygen for LAPACK from the source code.
(it was built by a robot, she's still iconic π )
π and that's the whole page bestie, every flag, every parameter, every failure mode. go forth and know your machine's floating-point lore π
LAPACK β Version 3.12.0 β and the page itself is /home/abui...lamchf77.f(3). mwah, take care of her π«Άπ
π¦ where this page comes from
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- opensuse-leap 16.0: lapack-man 3.12.0-160000.2.2 Β· BSD-3-Clause
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms