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 SAA03707; Sat, 12 Oct 2002 18:48:49 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA03650 for ; Sat, 12 Oct 2002 18:48:48 +0200 (MET DST) Received: from mel-rto4.wanadoo.fr (smtp-out-4.wanadoo.fr [193.252.19.23]) by nez-perce.inria.fr (8.11.1/8.11.1) with ESMTP id g9CGmlD21479 for ; Sat, 12 Oct 2002 18:48:47 +0200 (MET DST) Received: from mel-rta9.wanadoo.fr (193.252.19.69) by mel-rto4.wanadoo.fr (6.5.007) id 3DA24D320031D8B8; Sat, 12 Oct 2002 18:48:46 +0200 Received: from iliana (80.11.160.38) by mel-rta9.wanadoo.fr (6.5.007) id 3DA24B2900327511; Sat, 12 Oct 2002 18:48:46 +0200 Received: from luther by iliana with local (Exim 3.36 #1 (Debian)) id 180Pax-0001Em-00; Sat, 12 Oct 2002 18:58:31 +0200 Date: Sat, 12 Oct 2002 18:58:31 +0200 To: John Carr Cc: Alessandro Baretta , Ocaml Subject: Re: [Caml-list] Runtime overflow and what to do Message-ID: <20021012165831.GA4700@iliana> References: <3DA6A4ED.5050700@baretta.com> <200210121613.MAA27433@psi-phi.mit.edu> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <200210121613.MAA27433@psi-phi.mit.edu> User-Agent: Mutt/1.4i From: Sven LUTHER Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk On Sat, Oct 12, 2002 at 12:13:32PM -0400, John Carr wrote: > > > If your problem is only the factorial function, then you can > > calculate statically (i.e. at source-code writing time) the > > value of the maximum integer whose factorial will fit in > > O'Caml's representation of integers, and test against that, > > once and for all, before entering the recursive calculation. > > OCaml supports 32 and 64 bit integers. Is it possible to detect at > compile time the size of the maximum integer? val max_int : int The greatest representable integer. Says the doc. BTW, i compile the sparc debian package on a sparc64 box which advertizes as a sparc box. Will i get access to the 64 bit integers in this case or not ? Friendly, Sven Luther ------------------- 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