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

Function fmax

include/half.hpp:2877–2881  ·  view source on GitHub ↗

Maximum of half expressions. See also:** Documentation for [std::fmax](https://en.cppreference.com/w/cpp/numeric/math/fmax). \param x first operand \param y second operand \return maximum 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

2875 /// \return maximum of operands, ignoring quiet NaNs
2876 /// \exception FE_INVALID if \a x or \a y is signaling NaN
2877 inline HALF_CONSTEXPR_NOERR half fmax(half x, half y)
2878 {
2879 return half(detail::binary, (!isnan(y) && (isnan(x) || (x.data_^(0x8000|(0x8000-(x.data_>>15)))) <
2880 (y.data_^(0x8000|(0x8000-(y.data_>>15)))))) ? detail::select(y.data_, x.data_) : detail::select(x.data_, y.data_));
2881 }
2882
2883 /// Minimum of half expressions.
2884 /// **See also:** Documentation for [std::fmin](https://en.cppreference.com/w/cpp/numeric/math/fmin).

Callers

nothing calls this directly

Calls 3

halfClass · 0.85
isnanFunction · 0.85
selectFunction · 0.85

Tested by

no test coverage detected