Version française
Home     About     Download     Resources     Contact us    

This site is updated infrequently. For up-to-date information, please visit the new OCaml website at

Browse thread
Re: [Caml-list] Runtime overflow and what to do
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Sven LUTHER <luther@d...>
Subject: Re: [Caml-list] Runtime overflow and what to do
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 ?


Sven Luther
To unsubscribe, mail Archives:
Bug reports: FAQ:
Beginner's list: