Boost logo

Boost :

Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Scott McMurray (me22.ca+boost_at_[hidden])
Date: 2010-03-28 16:45:29


On 28 March 2010 11:59, Chad Nelson <chad.thecomfychair_at_[hidden]> wrote:
>
> Certainly, in both computer science and mathematics. But by the
> mathematical definition, infinity isn't a number, it's a representation
> of an impossible number. So logically, representing it with the
> not-a-number value is correct.
>

+Infinity represents the concept of something larger than any specific
value you can state, and -Infinity something smaller.

So while you could choose to just use NaN in place of the infinities,
there are situations in which infinity is reasonable where NaN is not.
 Imagine a container of intervals, for example -- there, +/- infinity
would be very useful for the two outermost endpoints. And something
like atan(Infinity) can reasonably give \pi/2, whereas atan(NaN) can
only give NaN.


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk