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

Function fmin

include/half.hpp:2889–2893  ·  view source on GitHub ↗

Minimum of half expressions. See also:** Documentation for [std::fmin](https://en.cppreference.com/w/cpp/numeric/math/fmin). \param x first operand \param y second operand \return minimum of operands, ignoring quiet NaNs \exception FE_INVALID if \a x or \a y is signaling NaN

Source from the content-addressed store, hash-verified

2887 /// \return minimum of operands, ignoring quiet NaNs
2888 /// \exception FE_INVALID if \a x or \a y is signaling NaN
2889 inline HALF_CONSTEXPR_NOERR half fmin(half x, half y)
2890 {
2891 return half(detail::binary, (!isnan(y) && (isnan(x) || (x.data_^(0x8000|(0x8000-(x.data_>>15)))) >
2892 (y.data_^(0x8000|(0x8000-(y.data_>>15)))))) ? detail::select(y.data_, x.data_) : detail::select(x.data_, y.data_));
2893 }
2894
2895 /// Positive difference.
2896 /// This function is exact to rounding for all rounding modes.

Callers

nothing calls this directly

Calls 3

halfClass · 0.85
isnanFunction · 0.85
selectFunction · 0.85

Tested by

no test coverage detected