
On 2 April 2010 14:33, Chad Nelson <chad.thecomfychair@gmail.com> wrote:
I can agree with all of those except 0 * Inf and 0 * -Inf. If I remember correctly, zero times anything is zero, and that would apply to infinities too. Or am I missing something again?
It's because if the 0 came from x/Inf, the "0*Inf" is more like a x*(Inf/Inf). We used to call it the difference between a "real zero" and a "calculus zero". The former times anything -- even infinity -- is zero, but the latter leads to indeterminate forms.
:-) I'm not sure how useful the operations on infinities would be, but it looks like it would be easy enough to add them.
I doubt anyone would use them directly. I see them as there for defaults in cases where you need to provide something, but there's no finite value that's acceptable -- the interval example, or a modulo where you want the full value, for instance -- and as a way to intelligently propegate the bad_alloc error code.