DROUNDUP_LWORK(3)

πŸ“¦
version 3.12.1 Β· 4 versions
, in arch rolling

πŸ’… NAME πŸ’…

INSTALL/droundup_lwork.f β€” that's the page title, bestie, and the manual name is Library Functions Manual. Today's main character is the droundup_lwork function, and yes, we're getting into the floating-point tea. 🫢


🌈 SYNOPSIS 🌈

It's giving Functions/Subroutines energy:

double precision function droundup_lwork (lwork)
    DROUNDUP_LWORK

🧚 Function/Subroutine Documentation 🧚

The signature, exactly as the docs serve it:

double precision function droundup_lwork (integer lwork)
    DROUNDUP_LWORK

🎯 Purpose 🎯

okay so DROUNDUP_LWORK deals with a subtle bug with returning LWORK as a Float. This routine guarantees it is rounded up instead of down by multiplying LWORK by 1+eps when it is necessary, where eps is the relative machine precision. Iconic behavior, honestly. ✨

E.g., the examples are literally:

float( 9007199254740993            ) == 9007199254740992
float( 9007199254740993 ) * (1.+eps) == 9007199254740994

The return is DROUNDUP_LWORK β€” like, the docs say \return DROUNDUP_LWORK, and the verbatim block is:

DROUNDUP_LWORK >= LWORK.
DROUNDUP_LWORK is guaranteed to have zero decimal part.

No cap, that's the whole rounding-up vibe. πŸ’–

πŸŽ€ Parameters πŸŽ€

  • LWORK β€” Workspace size. That's the parameter, bestie. 🌸

πŸ’– Author πŸ’–

Shoutout to Weslley Pereira, University of Colorado Denver, USA β€” that's the author, periodt. πŸ‘‘


πŸ¦‹ Further Details πŸ¦‹

This routine was inspired in the method magma_zmake_lwork from MAGMA. The docs also \see this link:

https://bitbucket.org/icl/magma/src/master/control/magma_zauxiliary.cpp

Definition at line 58 of file droundup_lwork.f.


🫢 Author (Doxygen edition) 🫢

Generated automatically by Doxygen for LAPACK from the source code. Not me, bestie β€” Doxygen said it. πŸ’…


Cute sign-off: source/version is LAPACK Version 3.12.0, page tag is INSTALL/droundup_lwork.f(3), and no date is printed on this footer β€” so that's the whole tea. πŸ“πŸ§šπŸ’œ

πŸ“¦ where this page comes from