Hi,

At Sat, 3 Feb 2007 05:33:58 +0900,
Berger, Daniel wrote in [ruby-core:10174]:
> I noticed that, based on the Changelog, the domain_check() helper
> function was added to math.c to see if isnan() returns true and, if it
> does, an Errno::ERANGE or Errno::EDOM error is raised. Otherwise, a
> method will return "Infinity". But, there seems to be a discrepancy
> between UNIX and MS Windows.

atanh(1) in missing/acosh.c tries log(2.0 / 0.0) / 2, but
division by 0.0 yields infinity but nothing fails, and
log(infinity) yields infinity too.

According to SUS [1], atan(1) should raise ERANGE as on
Solaris.  But atanh(3) on x86 Linux also seems to set errno
EDOM.

It feels better to check the range in math_atanh().

[1] http://www.opengroup.org/onlinepubs/007908799/xsh/acosh.html

-- 
Nobu Nakada