Positive difference implementation. \param x first operand \param y second operand \return Positive difference stored in single-precision
| 1335 | /// \param y second operand |
| 1336 | /// \return Positive difference stored in single-precision |
| 1337 | static expr fdim(float x, float y) |
| 1338 | { |
| 1339 | #if HALF_ENABLE_CPP11_CMATH |
| 1340 | return expr(std::fdim(x, y)); |
| 1341 | #else |
| 1342 | return expr((x<=y) ? 0.0f : (x-y)); |
| 1343 | #endif |
| 1344 | } |
| 1345 | |
| 1346 | /// Fused multiply-add implementation. |
| 1347 | /// \param x first operand |