Boost logo

Boost :

From: Joel de Guzman (djowel_at_[hidden])
Date: 2002-10-19 13:41:11


----- Original Message -----
From: "Victor A. Wagner, Jr." <vawjr_at_[hidden]>

> <only slightly jesting>
> you left out "the C way"
> 4) just do modular arithmetic and leave it up to the programmer to "know"
> what's wrong
>
> or as Scott Meyers keeps saying (I paraphrase) "When in doubt, do what int
> does"
> </only slightly jesting>
>
> I don't have a good answer here.
> Most computers (that I've played with over the years) gave the answer
> modulo (max value + 1) and a flag (or trap) commonly called overflow.
> Most HLLs just give answer modulo (max value +1) and no way to even detect
> overflow.
> IMO, you're breaking new ground here (unfortunately)

1. AFAIK, what you are saying is implementation defined
2. There's a reason why modulo is not an option (sloooow, if I'm not mistaken)
3. Boost PP *IS* breaking new ground

Again 2c worth.
--Joel

> At Saturday 2002/10/19 10:22, you wrote:
> >----- Original Message -----
> >From: "Joel de Guzman" <djowel_at_[hidden]>
> >
> > > > 1) return a known (and detectable) error state
> > > > 2) saturate at the greatest value
> > > > 3) cause a glorious preprocessor failure
> > >
> > > Hi,
> > >
> > > Definitely 2.
> > >
> > > 2c worth
> > > --Joel
> >
> >That's what I'm leaning toward as well. Thanks for the 2c Joel.
> >
> >Paul Mensonides
> >_______________________________________________
> >Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>
> Victor A. Wagner Jr. http://rudbek.com
> PGP RSA fingerprint = 4D20 EBF6 0101 B069 3817 8DBF C846 E47A
> PGP D-H fingerprint = 98BC 65E3 1A19 43EC 3908 65B9 F755 E6F4 63BB 9D93
> The five most dangerous words in the English language:
> "There oughta be a law"
>
> _______________________________________________
> Unsubscribe & other changes: http://lists.boost.org/mailman/listinfo.cgi/boost
>


Boost list run by bdawes at acm.org, gregod at cs.rpi.edu, cpdaniel at pacbell.net, john at johnmaddock.co.uk