MCPcopy Create free account
hub / github.com/MegEngine/MegEngine / acosh

Method acosh

dnn/include/megdnn/dtype/half.hpp:1463–1472  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

1461 /// \param arg function argument
1462 /// \return function value stored in single-preicision
1463 MEGDNN_HOST MEGDNN_DEVICE static expr acosh(float arg)
1464 {
1465#if defined(__CUDA_ARCH__)
1466 return expr(acoshf(arg));
1467#elif HALF_ENABLE_CPP11_CMATH
1468 return expr(std::acosh(arg));
1469#else
1470 return expr((arg<-1.0f) ? std::numeric_limits<float>::quiet_NaN() : static_cast<float>(log(arg+sqrt(arg*arg-1.0))));
1471#endif
1472 }
1473
1474 /// Hyperbolic area tangent implementation.
1475 /// \param arg function argument

Callers 1

test_acoshFunction · 0.45

Calls 4

exprClass · 0.70
acoshFunction · 0.70
logFunction · 0.70
sqrtFunction · 0.70

Tested by 1

test_acoshFunction · 0.36