Positive difference implementation. \param x first operand \param y second operand \return Positive difference stored in single-precision
| 1733 | /// \param y second operand |
| 1734 | /// \return Positive difference stored in single-precision |
| 1735 | static expr fdim(float x, float y) |
| 1736 | { |
| 1737 | #if HALF_ENABLE_CPP11_CMATH |
| 1738 | return expr(std::fdim(x, y)); |
| 1739 | #else |
| 1740 | return expr((x <= y) ? 0.0f : (x - y)); |
| 1741 | #endif |
| 1742 | } |
| 1743 | |
| 1744 | /// Fused multiply-add implementation. |
| 1745 | /// \param x first operand |