MCPcopy Create free account
hub / github.com/apache/arrow / operator()

Method operator()

cpp/src/arrow/compare.cc:86–97  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

84 : epsilon(static_cast<T>(options.atol())) {}
85
86 bool operator()(T x, T y) const {
87 if (x == y) {
88 return Flags::signed_zeros_equal || (std::signbit(x) == std::signbit(y));
89 }
90 if (Flags::nans_equal && std::isnan(x) && std::isnan(y)) {
91 return true;
92 }
93 if (Flags::approximate && (fabs(x - y) <= epsilon)) {
94 return true;
95 }
96 return false;
97 }
98
99 const T epsilon;
100};

Callers

nothing calls this directly

Calls 1

signbitFunction · 0.85

Tested by

no test coverage detected