diff --git a/cpp-ch/local-engine/Functions/SparkFunctionRoundHalfUp.h b/cpp-ch/local-engine/Functions/SparkFunctionRoundHalfUp.h index 432595e09140..3e219b51a695 100644 --- a/cpp-ch/local-engine/Functions/SparkFunctionRoundHalfUp.h +++ b/cpp-ch/local-engine/Functions/SparkFunctionRoundHalfUp.h @@ -111,7 +111,14 @@ class BaseFloatRoundingHalfUpComputation template static VectorType apply(VectorType val) { - return roundWithMode(val, mode); + if constexpr (std::is_same_v) + { + return std::roundf(val); + } + else + { + return std::round(val); + } } static VectorType prepare(size_t scale)