Copilot commented on code in PR #48914:
URL: https://github.com/apache/arrow/pull/48914#discussion_r3908090845


##########
docs/source/cpp/compute.rst:
##########
@@ -566,6 +575,18 @@ Mixed time resolution temporal inputs will be cast to 
finest input resolution.
   intermediate stages of the computation.  If either argument is infinite, the
   result is ``+Inf`` even if the other argument is NaN.
 
+* \(4) Computes the floored modulo, where the result has the same sign as the
+  divisor.  This is equivalent to Python's ``%`` operator.  Integer and decimal
+  division by zero returns an error, while floating-point division by zero
+  returns NaN.  Decimal arguments are promoted to a common scale ``s``; the
+  result then has ``scale = s`` and ``precision = max(p1, p2)``.

Review Comment:
   Note (4) is attached to both `modulo` and `modulo_checked`, but the text 
currently says floating-point division by zero returns NaN. In the 
implementation, `modulo_checked` returns an error on floating-point division by 
zero (like other *_checked arithmetic kernels), so the docs here are misleading.
   
   This issue also appears on line 584 of the same file.



-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to