Boost logo

Boost :

From: Sohail Somani (s.somani_at_[hidden])
Date: 2006-05-16 19:48:37

> -----Original Message-----
> From: boost-bounces_at_[hidden]
> [mailto:boost-bounces_at_[hidden]] On Behalf Of Jonathan Ray
> Sent: Tuesday, May 16, 2006 3:11 PM
> To: boost_at_[hidden]
> Subject: [boost] BigInt divide-by-zero handling
> I'm planning to finish the BigInt library for SoC. I'm looking for
> some input about whether divide-by-zero should throw an exception, or
> just store a NaN and propagate that through any subsequent operations.
> Since ordinary ints just throw an exception, and my goal is to make
> BigInts have virtually the same interface as ints but never
> overflow, it seems
> reasonable to throw an exception. Any objections?

Further to my other email, maybe it makes sense to force integer divide
by zero. i.e.:

In some operator for BigInt:

        int a =5;
        int b =0;
        int c=a/b;

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