Cubic root implementation. \param arg function argument \return function value stored in single-preicision
| 1846 | /// \param arg function argument |
| 1847 | /// \return function value stored in single-preicision |
| 1848 | static expr cbrt(float arg) |
| 1849 | { |
| 1850 | #if HALF_ENABLE_CPP11_CMATH |
| 1851 | return expr(std::cbrt(arg)); |
| 1852 | #else |
| 1853 | if (builtin_isnan(arg) || builtin_isinf(arg)) |
| 1854 | return expr(arg); |
| 1855 | return expr(builtin_signbit(arg) ? -static_cast<float>(std::pow(-static_cast<double>(arg), 1.0 / 3.0)) |
| 1856 | : static_cast<float>(std::pow(static_cast<double>(arg), 1.0 / 3.0))); |
| 1857 | #endif |
| 1858 | } |
| 1859 | |
| 1860 | /// Hypotenuse implementation. |
| 1861 | /// \param x first argument |
nothing calls this directly
no test coverage detected