|
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
-----BEGIN PGP SIGNED MESSAGE-----
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
known.
- --
Chad Nelson
Oak Circle Software, Inc.
*
*
*
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org/
iEYEARECAAYFAku2PgYACgkQp9x9jeZ9/wRKkwCgsmE3nMiP63t5vEStHuLZh1bB
1kEAoMgvhQK6oRmhONXA2ijUL44QtkV+
=q32r
-----END PGP SIGNATURE-----
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk