Skip to content

Commit

Permalink
[BugFix] fix dcheck error for __floattidf (StarRocks#55510)
Browse files Browse the repository at this point in the history
Signed-off-by: before-Sunrise <[email protected]>
  • Loading branch information
before-Sunrise committed Feb 6, 2025
1 parent 4a69d4d commit 9dff445
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion be/src/runtime/int128_to_double.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,8 @@ double __wrap___floattidf(__int128 a) {
dstSigBits = 52,
};

[[maybe_unused]] __int128 original_value = a;

if (a == 0) return 0.0;

enum {
Expand Down Expand Up @@ -88,7 +90,7 @@ double __wrap___floattidf(__int128 a) {
dst_rep_t i;
} rep = {.i = result};

DCHECK(std::abs(rep.f - __real___floattidf(a)) < 0.001);
DCHECK(std::abs(rep.f - __real___floattidf(original_value)) < 0.001);
return rep.f;
}
} // namespace starrocks

0 comments on commit 9dff445

Please sign in to comment.