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: Richard Jones <rich@a...>
Subject: Re: [Caml-list] Bug? Random.int max_int on AMD64 fails
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.

Rich.

-- 
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com