caml-list - the Caml user's mailing list
 help / Atom feed
From: François Pottier <francois.pottier@inria.fr>
To: caml users <caml-list@inria.fr>
Subject: [Caml-list] zarith: how to pick a random integer?
Date: Wed, 27 Nov 2019 22:31:04 +0100
Message-ID: <a025b23b-a84d-164f-7fb9-06a5ee083753@inria.fr> (raw)


Hello,

I am using zarith and would like to pick a random integer
comprised between 0 and some bound. I would like a function
Z.random of type Z.t -> Z.t, but this function seems to be
missing, and I am not sure how to program it in an efficient
and correct way. Any suggestions would be welcome. Thanks!

-- 
François Pottier
francois.pottier@inria.fr
http://gallium.inria.fr/~fpottier/

             reply index

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2019-11-27 21:31 François Pottier [this message]
2019-11-27 21:52 ` Carl Eastlund
2019-11-28  8:13   ` François Pottier
2019-11-28  9:27 basile
2019-11-28  9:30 ` basile

Reply instructions:

You may reply publically 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=a025b23b-a84d-164f-7fb9-06a5ee083753@inria.fr \
    --to=francois.pottier@inria.fr \
    --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

caml-list - the Caml user's mailing list

Archives are clonable: git clone --mirror https://inbox.ocaml.org/caml-list

AGPL code for this site: git clone https://public-inbox.org/ public-inbox