jorisvandenbossche commented on a change in pull request #9841:
URL: https://github.com/apache/arrow/pull/9841#discussion_r612185920
##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
##########
@@ -359,6 +425,18 @@ const FunctionDoc div_checked_doc{
"integer overflow is encountered."),
{"dividend", "divisor"}};
+const FunctionDoc pow_doc{
+ "Raise arguments to power element-wise",
+ ("Integer to negative integer power returns an error. However, integer
overflow\n"
+ "wraps around. Floating poing power follows std::pow() behaviour.\n"),
Review comment:
Yeah, that's a lot (I didn't actually check it). But we can indeed pick
the most important cases.
I was mostly thinking about the special cases around 0 and 1:
> pow(+1, exp) returns 1 for any exp, even when exp is NaN
> pow(base, ±0) returns 1 for any base, even when base is NaN
But on the other hand, I see that also `np.power` docstring doesn't actually
mention special cases
--
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.
For queries about this service, please contact Infrastructure at:
[email protected]