From mboxrd@z Thu Jan 1 00:00:00 1970 Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by walapai.inria.fr (8.13.6/8.13.6) with ESMTP id p2RJ2kIu011487 for ; Sun, 27 Mar 2011 21:02:46 +0200 X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: Ap0CAM6Ij01KfVK2kGdsb2JhbAClSggUAQEBAQkJDQcUBCGlaIpUgiGDTS+IXAEBAwWFZASMd4NUc4REOg X-IronPort-AV: E=Sophos;i="4.63,251,1299452400"; d="scan'208";a="95102484" Received: from mail-wy0-f182.google.com ([74.125.82.182]) by mail2-smtp-roc.national.inria.fr with ESMTP/TLS/RC4-SHA; 27 Mar 2011 21:02:40 +0200 Received: by wyf23 with SMTP id 23so3800883wyf.27 for ; Sun, 27 Mar 2011 12:02:40 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=gamma; h=domainkey-signature:message-id:from:to:content-type :content-transfer-encoding:mime-version:subject:date:x-mailer; bh=X1DLFBCU+v5FsrZiyEpenIgzAfC3RfUoFPkwbDc8Sc8=; b=ryAbAFUI+KyLnIXixZvRJh0Tqbw3aaLf0Hc+Rp9o3hG9rCGUDRT5HfbfEoFKinx17O g0+1s+Ls1wxxvdbf7OtKjjd74WjZW5OPCIVsdhtxhkFSihLEiiDXqnN3BH0LKjqNeL2R afJgugK24GM8yR8TEo4MEZvQ2PoDOqt/wxLoE= DomainKey-Signature: a=rsa-sha1; c=nofws; d=gmail.com; s=gamma; h=message-id:from:to:content-type:content-transfer-encoding :mime-version:subject:date:x-mailer; b=FFN1vcrgPGfNFIFejGWzszK5gyUbtM+XsO5uGOfox51+voeWp3ktRXNeEwZLByjM/I zqHj9ijNFyR2/cuaviYT09gydubojHwb4Y/vNFE6jSoCmiinr9exPu5zLM3QE646xA1D AWNVeKWMbx6wcRj/byGerSBpYk6XMZDQns27c= Received: by 10.216.195.202 with SMTP id p52mr2827011wen.75.1301252560630; Sun, 27 Mar 2011 12:02:40 -0700 (PDT) Received: from [192.168.0.10] (lau06-2-82-234-138-87.fbx.proxad.net [82.234.138.87]) by mx.google.com with ESMTPS id n73sm1203298wej.12.2011.03.27.12.02.38 (version=TLSv1/SSLv3 cipher=OTHER); Sun, 27 Mar 2011 12:02:39 -0700 (PDT) Message-Id: From: Christophe Papazian To: OCaml List Content-Type: text/plain; charset=US-ASCII; format=flowed; delsp=yes Content-Transfer-Encoding: 7bit Mime-Version: 1.0 (Apple Message framework v936) Date: Sun, 27 Mar 2011 21:02:37 +0200 X-Mailer: Apple Mail (2.936) Subject: [Caml-list] Arithmetic operations 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