khwilson commented on code in PR #44630:
URL: https://github.com/apache/arrow/pull/44630#discussion_r1871711724


##########
cpp/src/arrow/compute/kernels/scalar_arithmetic.cc:
##########
@@ -273,6 +328,29 @@ struct Atan {
   }
 };
 
+struct Atanh {
+  template <typename T, typename Arg0>
+  static enable_if_floating_value<Arg0, T> Call(KernelContext*, Arg0 val, 
Status*) {
+    static_assert(std::is_same<T, Arg0>::value, "");
+    if (ARROW_PREDICT_FALSE((val < -1.0 || val > 1.0))) {

Review Comment:
   I actually went back and forth on this. In *python* they raise a domain 
error. In the C++ stdlib, they return ± infinity. So the code as is returns ± 
infinity and an error is raised (which I realize I didn't clear....). See 
[here](https://en.cppreference.com/w/cpp/numeric/math/atanh).
   
   Which library this PR should be consistent with



-- 
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