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

Method Call

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

Source from the content-addressed store, hash-verified

491struct Logb {
492 template <typename T, typename Arg0, typename Arg1>
493 static enable_if_floating_value<T> Call(KernelContext*, Arg0 x, Arg1 base, Status*) {
494 static_assert(std::is_same<T, Arg0>::value, "");
495 static_assert(std::is_same<Arg0, Arg1>::value, "");
496 if (x == 0.0) {
497 if (base == 0.0 || base < 0.0) {
498 return std::numeric_limits<T>::quiet_NaN();
499 } else {
500 return -std::numeric_limits<T>::infinity();
501 }
502 } else if (x < 0.0) {
503 return std::numeric_limits<T>::quiet_NaN();
504 }
505 return std::log(x) / std::log(base);
506 }
507};
508
509struct LogbChecked {

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected