caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
* [Caml-list] Arithmetic operations
@ 2011-03-27 19:02 Christophe Papazian
  2011-03-30 12:57 ` [Caml-list] " Dawid Toton
  0 siblings, 1 reply; 16+ messages in thread
From: Christophe Papazian @ 2011-03-27 19:02 UTC (permalink / raw)
  To: OCaml List

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


^ permalink raw reply	[flat|nested] 16+ messages in thread

end of thread, other threads:[~2011-03-31 23:43 UTC | newest]

Thread overview: 16+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2011-03-27 19:02 [Caml-list] Arithmetic operations Christophe Papazian
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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).