|
Boost : |
Subject: Re: [boost] New Boost.XInt Library, request preliminary review
From: Chad Nelson (chad.thecomfychair_at_[hidden])
Date: 2010-04-03 18:43:39
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1
On 04/03/2010 06:11 AM, DE wrote:
> let me try to summarize arguments for infinities and other stuff
>
> assumption: it'll be convenient if a thing, upon which some another
> thing would be built, provide natively some features which would be
> useful only in the implementation of that other thing built on top
> of it
>
> this looks like some kind of an inversion or degeneralization
> sure the prime thing shoud provied complete set of functionality with
> wich any other extension can be built
> but since the prime thing is not generally aware of other things which
> could be built around it it should not provide any feature which would
> *possibly* be useful
In general, I agree. But if XInt is accepted into Boost, there will
*definitely* be an arbitrary-precision real type built onto it. I may do
it myself, if no one else steps up, but I'm fairly certain that someone
will -- it's a perfect GSoC project, for example. As such, planning for
it isn't really degeneralization in this particular case.
> assumption: there should be signed zeros like that of ieee floating
> point numbers
>
> floating point numbers is the generalization of integers but not
> the other way round
> i think you forgot that
> trying to make integer behavior similar to that of floating point
> numbers is wrong imho
> that's why you have no sound argument for this -- because it's not
> natural for ints
Exactly my thoughts. But if it does make life noticeably easier for
whoever implements the real type, and doesn't cause any problems with
the integer type, I'm willing to entertain the idea.
> assumption: the presence of (signed) infinities would provide ultimate
> set of relationships of the domain entities as well as consistence of
> some operations' behavior
>
> since there was no example of an application of infinities except
> interval arithmetics i see no reason to provide it [...]
The more I think about it, the less decided I am over it. I believe
there are a few cases where it would be useful to have infinities, at
least for comparisons, but I can't think of any concrete examples and no
one else has provided any. And it does make for more work, both for me
in writing it, and (slightly) for the computer when using it.
At the moment, I'm inclined to leave it out of the library for now, at
least until someone can show an application where it would be more
useful than the Not-a-Number value. But there's still at least a few
days for people to make their cases before I have to make a decision.
And we can always revisit the idea after the 1.0 release is stable.
- --
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/
iEYEARECAAYFAku3xJcACgkQp9x9jeZ9/wQDBwCgp1aMiGzNM0/umLyMiqoaJYWC
NroAn1f9wN2narrDVbKOUyuHE2l854PT
=qFCs
-----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