fix(libc): accept the full llroundl integer range

This commit is contained in:
QRMOE authored and GitHub committed 2026-10-13 07:46:49 +02:00
1 parent 88107b7de6
commit f745a00a5d
1 file changed
+1 -1
+1 -1
View File
@@ -18,7 +18,7 @@ namespace {
template<typename TFloat>
std::int64_t RoundToInt64(TFloat value) {
const TFloat rounded = std::round(value);
if (!(rounded >= static_cast<TFloat>(INT64_MIN) && rounded < static_cast<TFloat>(INT64_MAX))) {
if (!(rounded >= static_cast<TFloat>(INT64_MIN) && rounded < -static_cast<TFloat>(INT64_MIN))) {
std::feraiseexcept(FE_INVALID);
return INT64_MIN;
}