Hypotenuse implementation. \param x first argument \param y second argument \return function value stored in single-preicision
| 1462 | /// \param y second argument |
| 1463 | /// \return function value stored in single-preicision |
| 1464 | static expr hypot(float x, float y) |
| 1465 | { |
| 1466 | #if HALF_ENABLE_CPP11_CMATH |
| 1467 | return expr(std::hypot(x, y)); |
| 1468 | #else |
| 1469 | return expr((builtin_isinf(x) || builtin_isinf(y)) ? std::numeric_limits<float>::infinity() : |
| 1470 | static_cast<float>(std::sqrt(static_cast<double>(x)*x+static_cast<double>(y)*y))); |
| 1471 | #endif |
| 1472 | } |
| 1473 | |
| 1474 | /// Power implementation. |
| 1475 | /// \param base value to exponentiate |
nothing calls this directly
no test coverage detected