Infinity is a very slippery concept, you can't compute with it like that.
You can compute various limits, though.
So, e.g., for a > 0
  lim x*a -> Inf
  x->Inf
and
  lim x*0 -> 0
  x->Inf
But
  lim x*(1/x) -> 1
  x->Inf
And that last one would be "Inf*0" in the limit.  In fact, you can make Inf*0 any number you like.  So NaN is the sensible.

  -- Lennart

On 8/4/07, Andrew Coppin <andrewcoppin@btinternet.com> wrote:

>
>> Um... why would infinity * 0 be NaN? That doesn't make sense...
> Infinity times anything is Infinity.  Zero times anything is zero.  So
> what should Infinity * zero be?  There isn't one right answer.  In
> this case the "morally correct" answer is zero, but in other contexts
> it might be Infinity or even some finite number other than zero.

I don't follow.

Infinity times any positive quantity gives positive infinity.
Infinity times any negative quantity gives negative infinity.
Infinity times zero gives zero.

What's the problem?

> Consider 0.0 / 0.0, which also evaluates to NaN.

Division by zero is *definitely* undefined. (The equation 0 * k = v has
no solutions.)

_______________________________________________
Haskell-Cafe mailing list
Haskell-Cafe@haskell.org
http://www.haskell.org/mailman/listinfo/haskell-cafe