Positive difference implementation. \param x first operand \param y second operand \return Positive difference stored in single-precision
| 1348 | /// \param y second operand |
| 1349 | /// \return Positive difference stored in single-precision |
| 1350 | static expr fdim(float x, float y) |
| 1351 | { |
| 1352 | #if HALF_ENABLE_CPP11_CMATH |
| 1353 | return expr(std::fdim(x, y)); |
| 1354 | #else |
| 1355 | return expr((x<=y) ? 0.0f : (x-y)); |
| 1356 | #endif |
| 1357 | } |
| 1358 | |
| 1359 | /// Fused multiply-add implementation. |
| 1360 | /// \param x first operand |