Version française
Home     About     Download     Resources     Contact us    
Browse thread
Bug? Random.int max_int on AMD64 fails
[ Home ] [ Index: by date | by threads ]
[ Search: ]

[ Message by date: previous | next ] [ Message in thread: previous | next ] [ Thread: previous | next ]
Date: -- (:)
From: Jean-Christophe Filliatre <Jean-Christophe.Filliatre@l...>
Subject: Re: [Caml-list] Bug? Random.int max_int on AMD64 fails

Richard Jones writes:
 > On Wed, Jun 01, 2005 at 10:14:01AM +0200, Christian Lindig wrote:
 > > ># Random.int max_int;;
 > > >Exception: Invalid_argument "Random.int".
 > > >#
 > 
 > The documentation states:
 > 
 > (** [Random.int bound] returns a random integer between 0 (inclusive)
 >      and [bound] (exclusive).  [bound] must be more than 0 and less
 >      than 2{^30}. *)
 > 
 > On 64 bit machines, max_int is 2^62 or thereabouts.

... and I'll add to this answer that you have Random.int64 available.

-- 
Jean-Christophe