Issue #2189 has been updated by Yui NARUSE.

Status changed from Closed to Assigned

This is from [ruby-dev:35669] (sorry for forgot describe this in r18252's log.
We discussed in it about differences of the result of Math.atanh(1).

In NetBSD 4, atanh(1) is NaN.

 RETURN VALUES
     If |x|>=1, atanh(x) and atanhf(x) return +inf, -inf or NaN, and sets the
     global variable errno to EDOM.

But in FreeBSD 7, atanh(1) is infinity.

 RETURN VALUES
     The atanh() and the atanhf() functions return the inverse hyperbolic tan-
     gent of x if successful.  If the argument has absolute value 1, a divide-
     by-zero exception is raised and an infinity is returned.  If |x| > 1, an
     invalid exception is raised and an NaN is returned.

In C99, described only atanh may cause ERANGE.

So we follow SUSv3, which defines atanh(x) as "If x is ±1, a pole error shall occur, (...)"
And make atanh raise Errno::EDOM or Errno::ERANGE.

So, that behavior is intended.
----------------------------------------
http://redmine.ruby-lang.org/issues/show/2189

----------------------------------------
http://redmine.ruby-lang.org