Hyperbolic area cosine implementation. \param arg function argument \return function value stored in single-preicision
| 1980 | /// \param arg function argument |
| 1981 | /// \return function value stored in single-preicision |
| 1982 | static expr acosh(float arg) |
| 1983 | { |
| 1984 | #if HALF_ENABLE_CPP11_CMATH |
| 1985 | return expr(std::acosh(arg)); |
| 1986 | #else |
| 1987 | return expr((arg < -1.0f) ? std::numeric_limits<float>::quiet_NaN() |
| 1988 | : static_cast<float>(std::log(arg + std::sqrt(arg * arg - 1.0)))); |
| 1989 | #endif |
| 1990 | } |
| 1991 | |
| 1992 | /// Hyperbolic area tangent implementation. |
| 1993 | /// \param arg function argument |