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


-----BEGIN PGP SIGNED MESSAGE-----
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
though.
- --
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/

iEYEARECAAYFAkuwDPgACgkQp9x9jeZ9/wS6ygCfayt7AnkjcDN4nnLCr6NFZFRS
/IkAn2adaeWga7tnCsCBmVlZXdC3vYdE
=3ov3
-----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