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 VAA14960; Fri, 13 Jul 2001 21:22:38 +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 VAA14956 for ; Fri, 13 Jul 2001 21:22:37 +0200 (MET DST) Received: from smtp1.cswv.com (smtp1.cswv.com [4.17.129.17]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f6DJMaT25733 for ; Fri, 13 Jul 2001 21:22:36 +0200 (MET DST) Received: from smtp1.cswv.com ([4.17.129.17]) by smtp1.cswv.com with Microsoft SMTPSVC(5.5.1877.197.19); Fri, 13 Jul 2001 15:23:09 -0400 Received: FROM exchange1.cswv.com BY smtp1.cswv.com ; Fri Jul 13 15:23:09 2001 -0400 Received: by exchange1.cswv.com with Internet Mail Service (5.5.2653.19) id ; Fri, 13 Jul 2001 15:25:20 -0400 Message-ID: From: "Krishnaswami, Neel" To: "'caml-list@inria.fr'" Subject: [Caml-list] Ints and overflow... Date: Fri, 13 Jul 2001 15:25:19 -0400 MIME-Version: 1.0 X-Mailer: Internet Mail Service (5.5.2653.19) Content-Type: text/plain; charset="iso-8859-1" Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hello, I need a really fast pseudo-rng (quality is second to speed) and decided to implement a linear congruential generator, since they are really simple and there are literally reams of papers describing good parameter choices. However, this has led me directly into the zone of integer overflow. Basically, I don't understand what I can expect to be portable, and I really don't understand what OCaml does -- what is the tagging scheme, and how does that affect the overflow results I can expect? For example: Is the integer tag 0 or 1? Does it vary by platform? Can the results vary by how Caml chooses to optimize adds? Does Caml promise anything at all about the results of an overflowing integer add? Each of these seems quite simple but the sum total leaves me quite lost. I would be very grateful if someone could relieve my confusion. -- Neel Krishnaswami neelk@cswcasa.com ------------------- Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr