Mailing list for all users of the OCaml language and system.
 help / color / mirror / Atom feed
From: "Krishnaswami, Neel" <neelk@cswcasa.com>
To: "'caml-list@inria.fr'" <caml-list@inria.fr>
Subject: [Caml-list] Ints and overflow...
Date: Fri, 13 Jul 2001 15:25:19 -0400	[thread overview]
Message-ID: <B1E4D3274D57D411BE8400D0B783FF322E8661@exchange1.cswv.com> (raw)

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


             reply	other threads:[~2001-07-13 19:22 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-07-13 19:25 Krishnaswami, Neel [this message]
2001-07-15 11:17 ` Xavier Leroy

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=B1E4D3274D57D411BE8400D0B783FF322E8661@exchange1.cswv.com \
    --to=neelk@cswcasa.com \
    --cc=caml-list@inria.fr \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox