End of Life Ruby 3.1 has reached end of life and gets no more fixes. Switch to Ruby 4.0 →
class method
Math.acosh
Math.acosh(x) → Float
math.c
View on GitHub ↗
static VALUE
math_acosh(VALUE unused_obj, VALUE x)
{
double d;
d = Get_Double(x);
domain_check_min(d, 1.0, "acosh");
return DBL2NUM(acosh(d));
}
Computes the inverse hyperbolic cosine of x.
Domain: [1, INFINITY)
Codomain: [0, INFINITY)
Example
Math.acosh(1) #=> 0.0