Boost logo

Boost :

From: Victor A. Wagner, Jr. (vawjr_at_[hidden])
Date: 2002-10-19 13:01:45

<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
</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
IMO, you're breaking new ground here (unfortunately)

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:

Victor A. Wagner Jr.
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"

Boost list run by bdawes at, gregod at, cpdaniel at, john at