liyafan82 commented on a change in pull request #7748:
URL: https://github.com/apache/arrow/pull/7748#discussion_r471345721



##########
File path: cpp/src/arrow/compute/kernels/scalar_arithmetic.cc
##########
@@ -186,6 +187,42 @@ struct MultiplyChecked {
   }
 };
 
+struct Divide {
+  template <typename T, typename Arg0, typename Arg1>
+  static constexpr enable_if_floating_point<T> Call(KernelContext*, Arg0 left,
+                                                    Arg1 right) {
+    return left / right;

Review comment:
       Thanks for your suggestion.
   According to the IEEE 754 standard, dividing by zero should be well-defined 
for floating point numbers. Please see, for example, 
https://dl.acm.org/doi/10.1145/103162.103163, page 26.




----------------------------------------------------------------
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:
us...@infra.apache.org


Reply via email to