Cubic root implementation. \param arg function argument \return function value stored in single-preicision
| 1446 | /// \param arg function argument |
| 1447 | /// \return function value stored in single-preicision |
| 1448 | static expr cbrt(float arg) |
| 1449 | { |
| 1450 | #if HALF_ENABLE_CPP11_CMATH |
| 1451 | return expr(std::cbrt(arg)); |
| 1452 | #else |
| 1453 | if(builtin_isnan(arg) || builtin_isinf(arg)) |
| 1454 | return expr(arg); |
| 1455 | return expr(builtin_signbit(arg) ? -static_cast<float>(std::pow(-static_cast<double>(arg), 1.0/3.0)) : |
| 1456 | static_cast<float>(std::pow(static_cast<double>(arg), 1.0/3.0))); |
| 1457 | #endif |
| 1458 | } |
| 1459 | |
| 1460 | /// Hypotenuse implementation. |
| 1461 | /// \param x first argument |
nothing calls this directly
no test coverage detected