Adam Debreceni created MINIFICPP-1384:
-----------------------------------------
Summary: Fix intdiv_ceil
Key: MINIFICPP-1384
URL: https://issues.apache.org/jira/browse/MINIFICPP-1384
Project: Apache NiFi MiNiFi C++
Issue Type: Bug
Reporter: Adam Debreceni
The current implementation goes like
{code:java}
return a / b + (a % b > 0){code}
this might give incorrect results on negative numbers:
{code:java}
intdiv_ceil(-5, -3) == 1
{code}
Either provide an implementation that behaves correctly for negative numbers as
well, or restrict the domain of the function to unsigned integral types.
--
This message was sent by Atlassian Jira
(v8.3.4#803005)