mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-20 08:40:50 +00:00
Update moduloOrZero.cpp
This commit is contained in:
parent
b358c796f1
commit
72280ee2a3
@ -16,6 +16,7 @@ struct ModuloOrZeroImpl
|
||||
{
|
||||
if constexpr (std::is_floating_point_v<ResultType>)
|
||||
{
|
||||
/// This computation is similar to `fmod` but the latter is not inlined and has 40 times worse performance.
|
||||
return ResultType(a) - trunc(ResultType(a) / ResultType(b)) * ResultType(b);
|
||||
}
|
||||
else
|
||||
|
Loading…
Reference in New Issue
Block a user