DROUNDUP_LWORK(3)
π DROUNDUP_LWORK(3) β Library Functions Manual
Okay bestie, welcome to the Library Functions Manual page for DROUNDUP_LWORK(3). This is the one that deals with the lowkey cursed float-rounding situation, and weβre gonna get through it together. π«Ά
πΈ NAME
The name on this page is this exact file path, character-for-character:
/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/INSTALL/droundup_lwork.f
β¨ SYNOPSIS
Under Functions/Subroutines, bestie:
Functions/Subroutines
double precision function DROUNDUP_LWORK (lwork)
DROUNDUP_LWORK
π¦ Function/Subroutine Documentation
Hereβs the actual signature, no cap:
double precision function DROUNDUP_LWORK (integer lwork)
DROUNDUP_LWORK
π Purpose
DROUNDUP_LWORK deals with a subtle bug with returning LWORK as a Float. It guarantees that the value is rounded up instead of down by multiplying LWORK by 1+eps when it is necessary, where eps is the relative machine precision. Iykyk, float behavior can be messy. π
E.g., the example is giving βfloating point betrayalβ:
float( 9007199254740993 ) == 9007199254740992
float( 9007199254740993 ) * (1.+eps) == 9007199254740994
The return contract is:
\return DROUNDUP_LWORK
\verbatim
DROUNDUP_LWORK >= LWORK.
DROUNDUP_LWORK is guaranteed to have zero decimal part.
So: DROUNDUP_LWORK >= LWORK, and DROUNDUP_LWORK is guaranteed to have zero decimal part. Periodt. π
π Parameters
LWORKβ Workspace size.
π Author
Weslley Pereira, University of Colorado Denver, USA.
π Further Details
This routine was inspired in the method magma_zmake_lwork from MAGMA.
The \see link is:
https://bitbucket.org/icl/magma/src/master/control/magma_zauxiliary.cpp
Definition at line 58 of file droundup_lwork.f.
π Author
Generated automatically by Doxygen for LAPACK from the source code.
Cute sign-off time, bestie: this page is from LAPACK, Version 3.12.0, with the footer path /home/abui...dup_lwork.f(3). The footer doesnβt show a separate date line, so Iβm not gonna invent one β no technical cap. πβ¨
π¦ 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