From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id SAA06757; Fri, 6 Jun 2003 18:05:51 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id SAA06819 for ; Fri, 6 Jun 2003 18:05:50 +0200 (MET DST) Received: from mail-in-02.arcor-online.net (mail-in-02.arcor-online.net [151.189.21.42]) by concorde.inria.fr (8.11.1/8.11.1) with ESMTP id h56G5nH20015 for ; Fri, 6 Jun 2003 18:05:49 +0200 (MET DST) Received: from diebuntekuh.de (dialin-212-144-187-061.arcor-ip.net [212.144.187.61]) by mail-in-02.arcor-online.net (Postfix) with ESMTP id B051316741 for ; Fri, 6 Jun 2003 18:11:08 +0200 (CEST) Received: by diebuntekuh.de (Postfix, from userid 500) id 668E06078AC; Fri, 6 Jun 2003 18:05:24 +0200 (CEST) To: OCaml List Subject: [Caml-list] Missing function: "erf" From: Christoph Bauer Date: Fri, 06 Jun 2003 18:05:23 +0200 Message-ID: User-Agent: Gnus/5.1002 (Gnus v5.10.2) Emacs/21.3 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Spam: no; 0.00; bauer:01 pervasives:01 lacks:01 camlprim:01 val:01 foreach:01 expr:01 ocaml:01 binary:02 float:02 external:03 module:03 proc:05 functions:05 body:93 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Hi List, the Pervasives module defines a lot of common math functions like "sin", "cos", ..., but it lacks the "erf" (error function). Of course it's quite easy to write 5 lines of C code, but that's not nice. Can this function be added to the Pervasives module? Here is the OCamL/C Code: external erf : float -> float = "erf_float" CAMLprim value erf_float(value x) { return copy_double(erf(Double_val(x))); } Thanks, Christoph Bauer -- proc self {} {foreach c [split [info body self] ""] d {14 -7 0 0 4 -67 4 73 11 69 24 -83 -15 6 -4 -84 78 20 11 -78 -1 -1 79 19 -8 4} { binary scan $c c c if {[catch {append r [format %c [expr $c+$d]]}]} {return $r};}};puts [self] ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners