SROUNDUP_LWORK(3)

πŸ“¦ version 3.12.0, in opensuse-leap 16.0

πŸ’… SROUNDUP_LWORK πŸ’…

okay bestie, welcome to the LAPACK Library Functions Manual β€” this page is all about SROUNDUP_LWORK, and it's giving tiny-subroutine-big-rounding-energy ✨ no cap.


🩷 NAME 🩷

/home/abuild/rpmbuild/BUILD/lapack-static-3.12.0-build/lapack-3.12.0/INSTALL/sroundup_lwork.f


✨ SYNOPSIS ✨

Functions/Subroutines

real function SROUNDUP_LWORK (lwork)
    SROUNDUP_LWORK

🧚 Function/Subroutine Documentation 🧚

real function SROUNDUP_LWORK (integer lwork)
    SROUNDUP_LWORK

πŸŽ€ Purpose: πŸŽ€

okay so SROUNDUP_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. Slay, honestly.

E.g., look at this little glow-up:

float( 16777217            ) == 16777216
float( 16777217 ) * (1.+eps) == 16777218

The docs mark the return as \return SROUNDUP_LWORK and open a \verbatim block for the guarantees:

  • SROUNDUP_LWORK >= LWORK.
  • SROUNDUP_LWORK is guaranteed to have zero decimal part.

🌸 Parameters 🌸

  • LWORK β€” Workspace size. That's the whole parameter, bestie πŸ’…

πŸ’– Author πŸ’–

Weslley Pereira, University of Colorado Denver, USA

πŸ¦‹ Further Details: πŸ¦‹

This routine was inspired in the method magma_zmake_lwork from MAGMA.

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

Definition at line 58 of file sroundup_lwork.f.


πŸŽ€ Author πŸŽ€

Generated automatically by Doxygen for LAPACK from the source code.


okay that's the whole vibe πŸ’– this page was doing LAPACK Version 3.12.0 in the footer, plus the path /home/abui...dup_lwork.f(3). Bye bestie β€” go round up your LWORK and slay ✨🫢

πŸ“¦ where this page comes from