MCPcopy Create free account
hub / github.com/apache/arrow / Call

Method Call

cpp/src/arrow/compute/kernels/scalar_arithmetic.cc:450–460  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

448struct Log2Checked {
449 template <typename T, typename Arg>
450 static enable_if_floating_value<Arg, T> Call(KernelContext*, Arg arg, Status* st) {
451 static_assert(std::is_same<T, Arg>::value, "");
452 if (arg == 0.0) {
453 *st = Status::Invalid("logarithm of zero");
454 return arg;
455 } else if (arg < 0.0) {
456 *st = Status::Invalid("logarithm of negative number");
457 return arg;
458 }
459 return std::log2(arg);
460 }
461};
462
463struct Log1p {

Callers

nothing calls this directly

Calls 1

InvalidFunction · 0.50

Tested by

no test coverage detected