MCPcopy Create free account
hub / github.com/apache/fory / equal

Method equal

cpp/fory/util/float16.h:95–102  ·  view source on GitHub ↗

---- Comparisons (IEEE 754-consistent) ---- NaN != NaN; +0 == -0.

Source from the content-addressed store, hash-verified

93 // ---- Comparisons (IEEE 754-consistent) ----
94 // NaN != NaN; +0 == -0.
95 [[nodiscard]] static bool equal(const float16_t a,
96 const float16_t b) noexcept {
97 if (is_nan(a) || is_nan(b))
98 return false;
99 if (is_zero(a) && is_zero(b))
100 return true;
101 return a.bits == b.bits;
102 }
103 // Returns false if either operand is NaN (unordered).
104 [[nodiscard]] static bool less(const float16_t a,
105 const float16_t b) noexcept {

Callers 4

assertTreeEqualFunction · 0.45
assertGraphEqualFunction · 0.45
verifySchemaMismatchFunction · 0.45

Calls

no outgoing calls

Tested by

no test coverage detected