MCPcopy Create free account
hub / github.com/apache/singa / isgreater

Function isgreater

include/half.hpp:4386–4389  ·  view source on GitHub ↗

Quiet comparison for greater than. See also:** Documentation for [std::isgreater](https://en.cppreference.com/w/cpp/numeric/math/isgreater). \param x first operand \param y second operand \retval true if \a x greater than \a y \retval false else

Source from the content-addressed store, hash-verified

4384 /// \retval true if \a x greater than \a y
4385 /// \retval false else
4386 inline HALF_CONSTEXPR bool isgreater(half x, half y)
4387 {
4388 return ((x.data_^(0x8000|(0x8000-(x.data_>>15))))+(x.data_>>15)) > ((y.data_^(0x8000|(0x8000-(y.data_>>15))))+(y.data_>>15)) && !isnan(x) && !isnan(y);
4389 }
4390
4391 /// Quiet comparison for greater equal.
4392 /// **See also:** Documentation for [std::isgreaterequal](https://en.cppreference.com/w/cpp/numeric/math/isgreaterequal).

Callers

nothing calls this directly

Calls 1

isnanFunction · 0.85

Tested by

no test coverage detected