From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA09400; Tue, 15 Oct 2002 21:25:56 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA09083 for ; Tue, 15 Oct 2002 21:25:55 +0200 (MET DST) Received: from pauillac.inria.fr (pauillac.inria.fr [128.93.11.35]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id g9FJPs525119; Tue, 15 Oct 2002 21:25:54 +0200 (MET DST) Received: (from xleroy@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id VAA09742; Tue, 15 Oct 2002 21:25:54 +0200 (MET DST) Date: Tue, 15 Oct 2002 21:25:53 +0200 From: Xavier Leroy To: Pierre Weis Cc: caml-list@inria.fr Subject: Re: [Caml-list] Runtime overflow and what to do Message-ID: <20021015212553.A9185@pauillac.inria.fr> References: <20021013181458.A28677@pauillac.inria.fr> <200210151915.VAA09316@pauillac.inria.fr> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Mailer: Mutt 1.0i In-Reply-To: <200210151915.VAA09316@pauillac.inria.fr>; from pierre.weis@inria.fr on Tue, Oct 15, 2002 at 09:15:10PM +0200 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > As a reward, note that your overflow test on addition raises overflow > when computing (max_int + 1) - 1, while this sum is actually > representable within a machine integer... More nit picking: max_int + 1 isn't representable, and (machine) addition evaluates it to min_int, which is clearly a case of overflow. - Xavier Leroy ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners