Changeset 96196 in vbox for trunk/src/VBox/Runtime/common/math
- Timestamp:
- Aug 14, 2022 1:03:18 AM (3 years ago)
- svn:sync-xref-src-repo-rev:
- 153004
- Location:
- trunk/src/VBox/Runtime/common/math
- Files:
-
- 6 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/src/VBox/Runtime/common/math/llround.cpp
r96126 r96196 42 42 rd = RT_NOCRT(round)(rd); 43 43 if (rd >= (double)LLONG_MIN && rd <= (double)LLONG_MAX) 44 return (long )rd;44 return (long long)rd; 45 45 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 46 return rd > 0 ? LLONG_MAX : LLONG_MIN;46 return rd > 0.0 ? LLONG_MAX : LLONG_MIN; 47 47 } 48 48 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 49 if (RT_NOCRT(isinf)(rd) && rd < 0.0) 50 return LLONG_MIN; 49 51 return LLONG_MAX; 50 52 } -
trunk/src/VBox/Runtime/common/math/llroundf.cpp
r96126 r96196 42 42 r32 = RT_NOCRT(roundf)(r32); 43 43 if (r32 >= (float)LLONG_MIN && r32 <= (float)LLONG_MAX) 44 return (long )r32;44 return (long long)r32; 45 45 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 46 return r32 > 0 ? LLONG_MAX : LLONG_MIN;46 return r32 > 0.0f ? LLONG_MAX : LLONG_MIN; 47 47 } 48 48 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 49 if (RT_NOCRT(__isinff)(r32) && r32 < 0.0) 50 return LLONG_MIN; 49 51 return LLONG_MAX; 50 52 } -
trunk/src/VBox/Runtime/common/math/llroundl.cpp
r96126 r96196 42 42 lrd = RT_NOCRT(roundl)(lrd); 43 43 if (lrd >= (long double)LLONG_MIN && lrd <= (long double)LLONG_MAX) 44 return (long )lrd;44 return (long long)lrd; 45 45 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 46 return lrd > 0 ? LLONG_MAX : LLONG_MIN;46 return lrd > 0.0L ? LLONG_MAX : LLONG_MIN; 47 47 } 48 48 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 49 if (RT_NOCRT(__isinfl)(lrd) && lrd < 0.0) 50 return LLONG_MIN; 49 51 return LLONG_MAX; 50 52 } -
trunk/src/VBox/Runtime/common/math/lround.cpp
r96126 r96196 44 44 return (long)rd; 45 45 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 46 return rd > 0 ? LONG_MAX : LONG_MIN;46 return rd > 0.0 ? LONG_MAX : LONG_MIN; 47 47 } 48 48 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 49 if (RT_NOCRT(isinf)(rd) && rd < 0.0) 50 return LONG_MIN; 49 51 return LONG_MAX; 50 52 } -
trunk/src/VBox/Runtime/common/math/lroundf.cpp
r96126 r96196 44 44 return (long)r32; 45 45 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 46 return r32 > 0 ? LONG_MAX : LONG_MIN;46 return r32 > 0.0f ? LONG_MAX : LONG_MIN; 47 47 } 48 48 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 49 if (RT_NOCRT(__isinff)(r32) && r32 < 0.0) 50 return LONG_MIN; 49 51 return LONG_MAX; 50 52 } -
trunk/src/VBox/Runtime/common/math/lroundl.cpp
r96126 r96196 44 44 return (long)lrd; 45 45 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 46 return lrd > 0 ? LONG_MAX : LONG_MIN;46 return lrd > 0.0L ? LONG_MAX : LONG_MIN; 47 47 } 48 48 /** @todo RT_NOCRT(feraiseexcept)(FE_INVALID); */ 49 if (RT_NOCRT(__isinfl)(lrd) && lrd < 0.0) 50 return LONG_MIN; 49 51 return LONG_MAX; 50 52 }
Note:
See TracChangeset
for help on using the changeset viewer.