felipecrv commented on code in PR #44904:
URL: https://github.com/apache/arrow/pull/44904#discussion_r1866160331


##########
cpp/src/arrow/compute/kernels/scalar_arithmetic_test.cc:
##########
@@ -1563,6 +1563,97 @@ TEST_F(TestUnaryArithmeticDecimal, Exp) {
   }
 }
 
+TYPED_TEST(TestUnaryArithmeticUnsigned, Expm1) {
+  auto expm1 = [](const Datum& arg, ArithmeticOptions, ExecContext* ctx) {
+    return Expm1(arg, ctx);
+  };
+  // Empty arrays
+  this->AssertUnaryOp(expm1, "[]", ArrayFromJSON(float64(), "[]"));
+  // Array with nulls
+  this->AssertUnaryOp(expm1, "[null]", ArrayFromJSON(float64(), "[null]"));
+  this->AssertUnaryOp(expm1, this->MakeNullScalar(), 
arrow::MakeNullScalar(float64()));
+  this->AssertUnaryOp(
+      expm1, "[null, 1, 10]",
+      ArrayFromJSON(float64(), "[null, 1.718281828459045, 
22025.465794806718]"));
+  this->AssertUnaryOp(expm1, this->MakeScalar(1),
+                      arrow::MakeScalar<double>(1.718281828459045F));

Review Comment:
   cargo-cult from the exp tests. I'm pushing a commit moving this to a 
`constexpr double` called `kEuler64`.



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