From 7c7442bed041c8fee72dd3763647fb41a208f573 Mon Sep 17 00:00:00 2001 From: before-Sunrise <71162020+before-Sunrise@users.noreply.github.com> Date: Wed, 5 Feb 2025 10:36:46 +0800 Subject: [PATCH] [BugFix] fix dcheck error for __floattidf (#55510) Signed-off-by: before-Sunrise --- be/src/runtime/int128_to_double.cpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/be/src/runtime/int128_to_double.cpp b/be/src/runtime/int128_to_double.cpp index 8f55ea783c202..5541001922fe8 100644 --- a/be/src/runtime/int128_to_double.cpp +++ b/be/src/runtime/int128_to_double.cpp @@ -31,6 +31,8 @@ double __wrap___floattidf(__int128 a) { dstSigBits = 52, }; + [[maybe_unused]] __int128 original_value = a; + if (a == 0) return 0.0; enum { @@ -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 \ No newline at end of file