VirtualBox

Changeset 96214 in vbox


Ignore:
Timestamp:
Aug 15, 2022 9:46:25 AM (3 years ago)
Author:
vboxsync
svn:sync-xref-src-repo-rev:
153025
Message:

IPRT/nocrt: l[l]round[fl] can now raise FE_INVALID as they ought to. bugref:10216

Location:
trunk/src/VBox/Runtime/common/math
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/src/VBox/Runtime/common/math/llround.cpp

    r96196 r96214  
    3333#include <iprt/nocrt/math.h>
    3434#include <iprt/nocrt/limits.h>
     35#include <iprt/nocrt/fenv.h>
    3536
    3637
     
    4344        if (rd >= (double)LLONG_MIN && rd <= (double)LLONG_MAX)
    4445            return (long long)rd;
    45         /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     46        RT_NOCRT(feraiseexcept)(FE_INVALID);
    4647        return rd > 0.0 ? LLONG_MAX : LLONG_MIN;
    4748    }
    48     /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     49    RT_NOCRT(feraiseexcept)(FE_INVALID);
    4950    if (RT_NOCRT(isinf)(rd) && rd < 0.0)
    5051        return LLONG_MIN;
  • trunk/src/VBox/Runtime/common/math/llroundf.cpp

    r96196 r96214  
    3333#include <iprt/nocrt/math.h>
    3434#include <iprt/nocrt/limits.h>
     35#include <iprt/nocrt/fenv.h>
    3536
    3637
     
    4344        if (r32 >= (float)LLONG_MIN && r32 <= (float)LLONG_MAX)
    4445            return (long long)r32;
    45         /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     46        RT_NOCRT(feraiseexcept)(FE_INVALID);
    4647        return r32 > 0.0f ? LLONG_MAX : LLONG_MIN;
    4748    }
    48     /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     49    RT_NOCRT(feraiseexcept)(FE_INVALID);
    4950    if (RT_NOCRT(__isinff)(r32) && r32 < 0.0)
    5051        return LLONG_MIN;
  • trunk/src/VBox/Runtime/common/math/llroundl.cpp

    r96196 r96214  
    3333#include <iprt/nocrt/math.h>
    3434#include <iprt/nocrt/limits.h>
     35#include <iprt/nocrt/fenv.h>
    3536
    3637
     
    4344        if (lrd >= (long double)LLONG_MIN && lrd <= (long double)LLONG_MAX)
    4445            return (long long)lrd;
    45         /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     46        RT_NOCRT(feraiseexcept)(FE_INVALID);
    4647        return lrd > 0.0L ? LLONG_MAX : LLONG_MIN;
    4748    }
    48     /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     49    RT_NOCRT(feraiseexcept)(FE_INVALID);
    4950    if (RT_NOCRT(__isinfl)(lrd) && lrd < 0.0)
    5051        return LLONG_MIN;
  • trunk/src/VBox/Runtime/common/math/lround.cpp

    r96196 r96214  
    3333#include <iprt/nocrt/math.h>
    3434#include <iprt/nocrt/limits.h>
     35#include <iprt/nocrt/fenv.h>
    3536
    3637
     
    4344        if (rd >= (double)LONG_MIN && rd <= (double)LONG_MAX)
    4445            return (long)rd;
    45         /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     46        RT_NOCRT(feraiseexcept)(FE_INVALID);
    4647        return rd > 0.0 ? LONG_MAX : LONG_MIN;
    4748    }
    48     /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     49    RT_NOCRT(feraiseexcept)(FE_INVALID);
    4950    if (RT_NOCRT(isinf)(rd) && rd < 0.0)
    5051        return LONG_MIN;
  • trunk/src/VBox/Runtime/common/math/lroundf.cpp

    r96196 r96214  
    3333#include <iprt/nocrt/math.h>
    3434#include <iprt/nocrt/limits.h>
     35#include <iprt/nocrt/fenv.h>
    3536
    3637
     
    4344        if (r32 >= (float)LONG_MIN && r32 <= (float)LONG_MAX)
    4445            return (long)r32;
    45         /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     46        RT_NOCRT(feraiseexcept)(FE_INVALID);
    4647        return r32 > 0.0f ? LONG_MAX : LONG_MIN;
    4748    }
    48     /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     49    RT_NOCRT(feraiseexcept)(FE_INVALID);
    4950    if (RT_NOCRT(__isinff)(r32) && r32 < 0.0)
    5051        return LONG_MIN;
  • trunk/src/VBox/Runtime/common/math/lroundl.cpp

    r96196 r96214  
    3333#include <iprt/nocrt/math.h>
    3434#include <iprt/nocrt/limits.h>
     35#include <iprt/nocrt/fenv.h>
    3536
    3637
     
    4344        if (lrd >= (long double)LONG_MIN && lrd <= (long double)LONG_MAX)
    4445            return (long)lrd;
    45         /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     46        RT_NOCRT(feraiseexcept)(FE_INVALID);
    4647        return lrd > 0.0L ? LONG_MAX : LONG_MIN;
    4748    }
    48     /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */
     49    RT_NOCRT(feraiseexcept)(FE_INVALID);
    4950    if (RT_NOCRT(__isinfl)(lrd) && lrd < 0.0)
    5051        return LONG_MIN;
Note: See TracChangeset for help on using the changeset viewer.

© 2025 Oracle Support Privacy / Do Not Sell My Info Terms of Use Trademark Policy Automated Access Etiquette