atanh(p1)
  public
  
    
    
Computes the inverse hyperbolic tangent of x.
   
  
    Show source    
    
      static VALUE
math_atanh(VALUE obj, VALUE x)
{
    double d0, d;
    Need_Float(x);
    d0 = RFLOAT_VALUE(x);
    /* check for domain error */
    if (d0 <  -1.0 || +1.0 <  d0) domain_error("atanh");
    /* check for pole error */
    if (d0 == -1.0) return DBL2NUM(-INFINITY);
    if (d0 == +1.0) return DBL2NUM(+INFINITY);
    d = atanh(d0);
    return DBL2NUM(d);
}