roundup_lwork - roundup_lwork: fix rounding integer to float
Contents
Detailed Description
Function Documentation
doubleprecisionfunctiondroundup_lwork(integerlwork)DROUNDUP_LWORKPurpose:
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.
E.g.,
float( 9007199254740993 ) == 9007199254740992
float( 9007199254740993 ) * (1.+eps) == 9007199254740994
\return DROUNDUP_LWORK
\verbatim
DROUNDUP_LWORK >= LWORK.
DROUNDUP_LWORK is guaranteed to have zero decimal part.
ParametersLWORK Workspace size.
Author
Weslley Pereira, University of Colorado Denver, USA
FurtherDetails:
This routine was inspired in the method `magma_zmake_lwork` from MAGMA.
\see https://bitbucket.org/icl/magma/src/master/control/magma_zauxiliary.cpp
realfunctionsroundup_lwork(integerlwork)SROUNDUP_LWORKPurpose:
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.
E.g.,
float( 16777217 ) == 16777216
float( 16777217 ) * (1.+eps) == 16777218
\return SROUNDUP_LWORK
\verbatim
SROUNDUP_LWORK >= LWORK.
SROUNDUP_LWORK is guaranteed to have zero decimal part.
ParametersLWORK Workspace size.
Author
Weslley Pereira, University of Colorado Denver, USA
FurtherDetails:
This routine was inspired in the method `magma_zmake_lwork` from MAGMA.
\see https://bitbucket.org/icl/magma/src/master/control/magma_zauxiliary.cpp
Name
roundup_lwork - roundup_lwork: fix rounding integer to float
Synopsis
Functions
double precision function droundup_lwork (lwork)
DROUNDUP_LWORK
real function sroundup_lwork (lwork)
SROUNDUP_LWORK
