From: Christophe Papazian <christophe.papazian@gmail.com>
To: OCaml List <caml-list@inria.fr>
Subject: [Caml-list] Arithmetic operations
Date: Sun, 27 Mar 2011 21:02:37 +0200 [thread overview]
Message-ID: <B4FBC5C8-6915-4348-8181-408CB51D07A3@gmail.com> (raw)
Hi
It would be so good if some missing operations on numbers could be
added to the standard set :
For regular integer : sqrt, pow, log2, factorial
For Big_int : log2, lsl, lsr, lor, land, lxor, lnot, factorial
For reals : erf, erfc, gamma, lgamma, and constante pi
For info : log2 n returns the position of the highest weight bit in n
(integer logarithmic)
(log2 0 -> 0, log2 1 -> 1, log2 2 to 3 -> 2, log2 4 to 7 -> 3, log2 8
to 15 -> 4, log2 16 to 31 -> 5, etc...)
The lack of those functions gives a feeling of immaturity of the
language.
Is it possible in some near futur release to add them ?
Christophe
next reply other threads:[~2011-03-27 19:02 UTC|newest]
Thread overview: 16+ messages / expand[flat|nested] mbox.gz Atom feed top
2011-03-27 19:02 Christophe Papazian [this message]
2011-03-30 12:57 ` [Caml-list] " Dawid Toton
2011-03-31 7:56 ` Christophe Papazian
2011-03-31 8:19 ` Pierre-Alexandre Voye
2011-03-31 9:23 ` Philippe Strauss
2011-03-31 9:38 ` Pierre-Alexandre Voye
2011-03-31 12:19 ` Gabriel Scherer
[not found] ` <133381EA-5DD1-4B00-A3BA-69127B259BE2@philou.ch>
2011-03-31 13:10 ` Gabriel Scherer
2011-03-31 15:52 ` Gabriel Scherer
2011-03-31 16:45 ` Ashish Agarwal
2011-03-31 18:13 ` Anthony Tavener
2011-03-31 19:30 ` Gerd Stolpmann
2011-03-31 23:43 ` Yaron Minsky
2011-03-31 8:36 ` Gabriel Scherer
2011-03-31 9:16 ` Erik de Castro Lopo
2011-03-31 12:50 ` Gerd Stolpmann
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=B4FBC5C8-6915-4348-8181-408CB51D07A3@gmail.com \
--to=christophe.papazian@gmail.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