nifi-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Adam Debreceni (Jira)" <>
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
             Project: Apache NiFi MiNiFi C++
          Issue Type: Bug
            Reporter: Adam Debreceni

The current implementation goes like
return a / b + (a % b > 0){code}
this might give incorrect results on negative numbers:
intdiv_ceil(-5, -3) == 1
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

View raw message