ABSTRACT

B. arccosh Computes the inverse hyperbolic cosine of the argument x. If x = 1 then the value 0 is delivered. If 1 < x ≤ 1010 then we use the formula arccosh(x) = ln(x + √(x*x-1)). If x > 1010 we use the formula arccosh(x) = ln(2) + ln(x). If x is close to 1, say x = 1 + y, then it is advised to use the procedure logoneplusx by writing arccosh(x) = ln(1 + y + √(y*(y+2)) ). For example, if x = exp(t), t > 0, t is small, then y = exp(t) - 1 is available in good relative accuracy, y = 2 * exp(t/2) * sinh(t/2). Procedure parameters: double arccosh (x) arccosh: delivers the inverse hyperbolic cosine of the argument x; x: double; entry: the real argument of arccosh(x), x ≥ 1. public static double arccosh(double x) { return ((x <= 1.0) ? 0.0 : ((x > 1.0e10) ? 0.69314718055995+Math.log(x) : Math.log(x+Math.sqrt((x-1.0)*(x+1.0))))); }

C. arctanh Computes the inverse hyperbolic tangent of the argument x. If x < 1 then we use the procedure logoneplusx by writing arctanh(x) = 0.5 * ln((1+x)/(1-x)) = 0.5 * ln(1 + 2*x/(1-x)). If x = 1 then the value is sign(x) * MAX_VALUE, where MAX_VALUE is a large number. Procedure parameters: double arctanh (x) arctanh: delivers the inverse hyperbolic tangent of the argument x; x: double; entry: the real argument of arctanh(x).