nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Debreceni (Jira)" <j...@apache.org>
Subject [jira] [Created] (MINIFICPP-1384) Fix intdiv_ceil
Date Thu, 01 Oct 2020 10:58:00 GMT
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)

Mime
View raw message