Hyperbolic area cosine implementation. \param arg function argument \return function value stored in single-preicision
| 1544 | /// \param arg function argument |
| 1545 | /// \return function value stored in single-preicision |
| 1546 | static expr acosh(float arg) |
| 1547 | { |
| 1548 | #if HALF_ENABLE_CPP11_CMATH |
| 1549 | return expr(std::acosh(arg)); |
| 1550 | #else |
| 1551 | return expr((arg<-1.0f) ? std::numeric_limits<float>::quiet_NaN() : static_cast<float>(std::log(arg+std::sqrt(arg*arg-1.0)))); |
| 1552 | #endif |
| 1553 | } |
| 1554 | |
| 1555 | /// Hyperbolic area tangent implementation. |
| 1556 | /// \param arg function argument |