Hypotenuse implementation. \param x first argument \param y second argument \return function value stored in single-preicision
| 1449 | /// \param y second argument |
| 1450 | /// \return function value stored in single-preicision |
| 1451 | static expr hypot(float x, float y) |
| 1452 | { |
| 1453 | #if HALF_ENABLE_CPP11_CMATH |
| 1454 | return expr(std::hypot(x, y)); |
| 1455 | #else |
| 1456 | return expr((builtin_isinf(x) || builtin_isinf(y)) ? std::numeric_limits<float>::infinity() : |
| 1457 | static_cast<float>(std::sqrt(static_cast<double>(x)*x+static_cast<double>(y)*y))); |
| 1458 | #endif |
| 1459 | } |
| 1460 | |
| 1461 | /// Power implementation. |
| 1462 | /// \param base value to exponentiate |
nothing calls this directly
no test coverage detected