3 /* acosh(x) = log(x + sqrt(x*x-1)) */
6 union {double f; uint64_t i;} u = {.f = x};
7 unsigned e = u.i >> 52 & 0x7ff;
9 /* x < 1 domain error is handled in the called functions */
12 /* |x| < 2, up to 2ulp error in [1,1.125] */
13 return log1p(x-1 + sqrt((x-1)*(x-1)+2*(x-1)));
16 return log(2*x - 1/(x+sqrt(x*x-1)));
17 /* |x| >= 0x1p26 or nan */
18 return log(x) + 0.693147180559945309417232121458176568;