Boost logo

Boost :

Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2010-03-28 22:14:16

Hash: SHA1

>> Which would defeat the primary purpose of the NaN value in the
>> XInt library, which is to have something to return instead of
>> throwing an exception when exceptions are blocked. :-)
> If that's the purpose of your NaN, why limit your set of "special"
> values to just { NaN }, when under some circumstances returning some
> representation of infinity (or +infinity or -infinity if you make
> such a distinction) would be more informative? For example, you can
> make n/0 for n != 0 result in infinity,

I could, but why? Who needs to know that n/0 is specifically infinity,
rather than simply NaN? If you can point out a case where it would help
someone more than returning a NaN would, I'll be happy to add it.

> and 0/0 result in NaN.

Technically, 0/0 should be allowed, with a result of 1. I don't know any
computer implementation that bothers checking for that and allowing it
- --
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