Infinity is a very slippery concept, you can't compute with it like that.<br>You can compute various limits, though.<br>So, e.g., for a > 0<br> lim x*a -> Inf<br> x->Inf<br>and<br> lim x*0 -> 0<br> x->Inf
<br>But<br> lim x*(1/x) -> 1<br> x->Inf<br>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.<br><br> -- Lennart<br><br><div><span class="gmail_quote">
On 8/4/07, <b class="gmail_sendername">Andrew Coppin</b> <<a href="mailto:email@example.com">firstname.lastname@example.org</a>> wrote:</span><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>><br>>> Um... why would infinity * 0 be NaN? That doesn't make sense...<br>> Infinity times anything is Infinity. Zero times anything is zero. So<br>> what should Infinity * zero be? There isn't one right answer. In
<br>> this case the "morally correct" answer is zero, but in other contexts<br>> it might be Infinity or even some finite number other than zero.<br><br>I don't follow.<br><br>Infinity times any positive quantity gives positive infinity.
<br>Infinity times any negative quantity gives negative infinity.<br>Infinity times zero gives zero.<br><br>What's the problem?<br><br>> Consider 0.0 / 0.0, which also evaluates to NaN.<br><br>Division by zero is *definitely* undefined. (The equation 0 * k = v has
<br>no solutions.)<br><br>_______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br><a href="http://www.haskell.org/mailman/listinfo/haskell-cafe">