diff --git a/internal/core/src/bitset/common.h b/internal/core/src/bitset/common.h index 1d4bb8186b..a8b1d4e4e3 100644 --- a/internal/core/src/bitset/common.h +++ b/internal/core/src/bitset/common.h @@ -148,7 +148,7 @@ struct ArithCompareOperator { } else if constexpr (AOp == ArithOpType::Div) { return CompareOperator::compare(left / right, value); } else if constexpr (AOp == ArithOpType::Mod) { - return CompareOperator::compare(fmod(left, right), value); + return CompareOperator::compare(long(left) % long(right), value); } else { // unimplemented static_assert(always_false_v, "unimplemented"); diff --git a/internal/core/src/exec/expression/BinaryArithOpEvalRangeExpr.h b/internal/core/src/exec/expression/BinaryArithOpEvalRangeExpr.h index 0ffb83a936..59e281da05 100644 --- a/internal/core/src/exec/expression/BinaryArithOpEvalRangeExpr.h +++ b/internal/core/src/exec/expression/BinaryArithOpEvalRangeExpr.h @@ -122,7 +122,7 @@ struct ArithOpElementFunc { res[i] = (src[offset] / right_operand) == val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(src[offset], right_operand)) == val; + res[i] = (long(src[offset]) % long(right_operand)) == val; } else { PanicInfo(OpTypeInvalid, fmt::format("unsupported arith type:{} for " @@ -143,7 +143,7 @@ struct ArithOpElementFunc { res[i] = (src[offset] / right_operand) != val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(src[offset], right_operand)) != val; + res[i] = (long(src[offset]) % long(right_operand)) != val; } else { PanicInfo(OpTypeInvalid, fmt::format("unsupported arith type:{} for " @@ -165,7 +165,7 @@ struct ArithOpElementFunc { res[i] = (src[offset] / right_operand) > val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(src[offset], right_operand)) > val; + res[i] = (long(src[offset]) % long(right_operand)) > val; } else { PanicInfo(OpTypeInvalid, fmt::format("unsupported arith type:{} for " @@ -187,7 +187,7 @@ struct ArithOpElementFunc { res[i] = (src[offset] / right_operand) >= val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(src[offset], right_operand)) >= val; + res[i] = (long(src[offset]) % long(right_operand)) >= val; } else { PanicInfo(OpTypeInvalid, fmt::format("unsupported arith type:{} for " @@ -208,7 +208,7 @@ struct ArithOpElementFunc { res[i] = (src[offset] / right_operand) < val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(src[offset], right_operand)) < val; + res[i] = (long(src[offset]) % long(right_operand)) < val; } else { PanicInfo(OpTypeInvalid, fmt::format("unsupported arith type:{} for " @@ -229,7 +229,7 @@ struct ArithOpElementFunc { res[i] = (src[offset] / right_operand) <= val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(src[offset], right_operand)) <= val; + res[i] = (long(src[offset]) % long(right_operand)) <= val; } else { PanicInfo(OpTypeInvalid, fmt::format("unsupported arith type:{} for " @@ -309,7 +309,7 @@ struct ArithOpIndexFunc { res[i] = (raw.value() / right_operand) == val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(raw.value(), right_operand)) == val; + res[i] = (long(raw.value()) % long(right_operand)) == val; } else { PanicInfo( OpTypeInvalid, @@ -331,7 +331,7 @@ struct ArithOpIndexFunc { res[i] = (raw.value() / right_operand) != val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(raw.value(), right_operand)) != val; + res[i] = (long(raw.value()) % long(right_operand)) != val; } else { PanicInfo( OpTypeInvalid, @@ -353,7 +353,7 @@ struct ArithOpIndexFunc { res[i] = (raw.value() / right_operand) > val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(raw.value(), right_operand)) > val; + res[i] = (long(raw.value()) % long(right_operand)) > val; } else { PanicInfo( OpTypeInvalid, @@ -375,7 +375,7 @@ struct ArithOpIndexFunc { res[i] = (raw.value() / right_operand) >= val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(raw.value(), right_operand)) >= val; + res[i] = (long(raw.value()) % long(right_operand)) >= val; } else { PanicInfo( OpTypeInvalid, @@ -397,7 +397,7 @@ struct ArithOpIndexFunc { res[i] = (raw.value() / right_operand) < val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(raw.value(), right_operand)) < val; + res[i] = (long(raw.value()) % long(right_operand)) < val; } else { PanicInfo( OpTypeInvalid, @@ -419,7 +419,7 @@ struct ArithOpIndexFunc { res[i] = (raw.value() / right_operand) <= val; } else if constexpr (arith_op == proto::plan::ArithOpType::Mod) { - res[i] = (fmod(raw.value(), right_operand)) <= val; + res[i] = (long(raw.value()) % long(right_operand)) <= val; } else { PanicInfo( OpTypeInvalid,