Hi,

> 2010/2/18 Yukihiro Matsumoto <matz / ruby-lang.org>:
> I choose #2.

Great!

On Thu, Feb 18, 2010 at 7:25 AM, Yusuke ENDOH <mame / tsg.ne.jp> wrote:
> At first, I'll soon change the behaviors of atanh(1) and lgamma(inf)
> which are currently platform-dependent.     
> should raise ERANGE (currently raises EDOM on Linux), and the latter
> should return inf (currently raises EDOM on darwin).

I disagree with this reading. SUSv3 states that atanh(1) should return
Infinity and (only when the application has requested that behavior)
set the ERANGE error flag. Ruby must choose to do one or the other (or
else add a way to do both). Mathematically speaking, there is no doubt
that it should return Infinity and that this is more helpful than
raising an error.

The question is also valid for
Math.log(0.0)
Math.atanh(1.0)
Math.gamma(0.0)
0.0**(-n)

Look at the graph of 1/x. Look at the graph of Log(x). Now explain to
me why 1/0.0 is +Inf and Log(x) would not be -Inf?