From: Martin Bonner (martin.bonner_at_[hidden])
Date: 2006-05-30 05:21:21
[mailto:boost-bounces_at_[hidden]] On Behalf Of Ben Artin Sent: 28
May 2006 19:23 To: boost_at_[hidden]
Subject: Re: [boost] Infinite precision integer draft
> In article <4479A423.8010904_at_[hidden]>,
> Sebastian Redl <sebastian.redl_at_[hidden]> wrote:
>> David Abrahams wrote:
>>> Sebastian Redl <sebastian.redl_at_[hidden]> writes:
>>>> The main (only, really, when it comes down to it) difference
>>>> between a signed and an unsigned integer is that an unsigned
>>>> integer is defined never to have a value less than 0. There are
>>>> very valid reasons to enforce such a restriction,
>>> For example?
>> Various physical quantities only make sense for non-negative values.
> Wait a minute... please name one physical quantity that is
> a) Always integer
> b) Never negative
> c) Not just an enum (i.e., not just a finite set of possible values)
> I can't think of one, which makes me think that your argument about
> physical values is irrelevant, as you'd never use an unsigned
> *integer* for a physical value.
Stretching "physical" slightly, but how about "the number of elements of
a given set"? (Where such a set could be "the number of people alive
today"). The only difficulty I see with that, is that a 64-bit "long
long" would be more than enough for my example.
That raises the question, what are the use cases for the integer class?
-- Martin Bonner Martin.Bonner_at_[hidden] Pi Technology, Milton Hall, Ely Road, Milton, Cambridge, CB4 6WZ, ENGLAND Tel: +44 (0)1223 203894
Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk