MCPcopy Create free account
hub / github.com/OpenNMT/CTranslate2 / islessgreater

Function islessgreater

include/half_float/half.hpp:4456–4459  ·  view source on GitHub ↗

Quiet comarison for less or greater. See also:** Documentation for [std::islessgreater](https://en.cppreference.com/w/cpp/numeric/math/islessgreater). \param x first operand \param y second operand \retval true if either less or greater \retval false else

Source from the content-addressed store, hash-verified

4454 /// \retval true if either less or greater
4455 /// \retval false else
4456 inline HALF_CONSTEXPR bool islessgreater(half x, half y)
4457 {
4458 return x.data_!=y.data_ && ((x.data_|y.data_)&0x7FFF) && !isnan(x) && !isnan(y);
4459 }
4460
4461 /// Quiet check if unordered.
4462 /// **See also:** Documentation for [std::isunordered](https://en.cppreference.com/w/cpp/numeric/math/isunordered).

Callers

nothing calls this directly

Calls 1

isnanFunction · 0.85

Tested by

no test coverage detected