Boost logo

Boost :

Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2010-04-02 14:57:10

Hash: SHA1

On 04/02/2010 02:31 PM, DE wrote:

> Scott McMurray wrote :
>> Actually, you *can* calculate with infinity. That's the reason for
>> having it separate from NaN, and why it needs a sign. [...]
> i can not imagine any circumstances under which this stuff would be
> useful
> can you?

I can see some very limited uses for calculations with infinities,
mostly involving endpoints in a range.

> i see main applications of a big int lib as convenient implementation
> of crypto algorithms, compression algos and building an arbitrary
> precision floating (or fixed) point environment
> floating/fixed points built on top of a big int deal with infs and all
> that stuff beside the big int
> and remaining two cases don't need infs at all
> so what's on *your* mind?

I'm not sure what Scott has in mind, but there's one application you
haven't mentioned: simply using it as a much larger capacity integer, as
the Fibonacci example in the documentation demonstrates. Something like
that couldn't be calculated with the built-in integer types without a
lot of work-arounds, and would likely be problematic with floating-point
types as well, depending on their sizes (I haven't looked at floats and
doubles in many years, so I can't comment intelligently on them).

> apart from that the presence of infs complicates things -- both
> the conception and the implementation

Only slightly. Not enough to give me pause, if the details are already
- --
Chad Nelson
Oak Circle Software, Inc.
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla -


Boost list run by bdawes at, gregod at, cpdaniel at, john at