Cubic root implementation. \param arg function argument \return function value stored in single-preicision
| 1433 | /// \param arg function argument |
| 1434 | /// \return function value stored in single-preicision |
| 1435 | static expr cbrt(float arg) |
| 1436 | { |
| 1437 | #if HALF_ENABLE_CPP11_CMATH |
| 1438 | return expr(std::cbrt(arg)); |
| 1439 | #else |
| 1440 | if(builtin_isnan(arg) || builtin_isinf(arg)) |
| 1441 | return expr(arg); |
| 1442 | return expr(builtin_signbit(arg) ? -static_cast<float>(std::pow(-static_cast<double>(arg), 1.0/3.0)) : |
| 1443 | static_cast<float>(std::pow(static_cast<double>(arg), 1.0/3.0))); |
| 1444 | #endif |
| 1445 | } |
| 1446 | |
| 1447 | /// Hypotenuse implementation. |
| 1448 | /// \param x first argument |
nothing calls this directly
no test coverage detected