Hi,

Since we now have Float#nan? and Float#infinite? I think the following
constants should be added to Math (or Float?) for completeness:

NEGINF = Math.log(-1) # Or better way of generating NEGINF...
INF = -NEGINF
NAN = INF / INF

A cautionary tale for users of dynamical languages such as Ruby:

I had the constant definitions above in a unit test file but the test
cases kept failing no matter what I did. The problem was that I included
the NArray extension which in turn included Complex which redefined
Math.log so that it returned the correct complex number instead of
-Infinity above. Makes you think before changing the behavior of methods
in the standard distr... (and yes, I now know complex aliases Math.log to
Math.log!)

Regards,

/Robert