|
Boost : |
Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2010-04-02 14:50:52
On 2 April 2010 14:33, Chad Nelson <chad.thecomfychair_at_[hidden]> 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.
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk