From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: weis Received: (from weis@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id NAA05455 for caml-redistribution; Wed, 2 Dec 1998 13:48:10 +0100 (MET) Received: from nez-perce.inria.fr (nez-perce.inria.fr [192.93.2.78]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id VAA11209 for ; Tue, 1 Dec 1998 21:25:33 +0100 (MET) Received: from hadar.cs.Buffalo.EDU (hadar.cs.Buffalo.EDU [128.205.32.1]) by nez-perce.inria.fr (8.8.7/8.8.7) with ESMTP id VAA05742 for ; Tue, 1 Dec 1998 21:25:29 +0100 (MET) Received: (from whitley@localhost) by hadar.cs.Buffalo.EDU (8.8.8/8.8.5) id PAA00858; Tue, 1 Dec 1998 15:25:27 -0500 (EST) From: John Whitley MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Date: Tue, 1 Dec 1998 15:25:26 -0500 (EST) To: caml-list@inria.fr Subject: Re: nth_root of num? In-Reply-To: <13923.50811.334235.394872@sun8f.LRI> References: <13917.32917.504083.314031@sun8f.LRI> <13923.50811.334235.394872@sun8f.LRI> X-Mailer: VM 6.43 under 20.4 "Emerald" XEmacs Lucid Message-ID: <13924.20450.862916.697199@hadar.cs.Buffalo.EDU> Sender: weis Claude Marche writes: > An algorithm for computing the nth root of a float is easy : > > let nth_root n x = exp (log(x)/.(float_of_int n));; Alternatively, one could use the (**) float exponentiation operator: let nth_root n x = x ** (1.0 /. n);; -- John