You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@nifi.apache.org by "Adam Debreceni (Jira)" <ji...@apache.org> on 2020/10/01 10:58:00 UTC
[jira] [Created] (MINIFICPP-1384) Fix intdiv_ceil
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)