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 OAA31019; Fri, 27 Feb 2004 14:18:32 +0100 (MET) 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 OAA30456 for ; Fri, 27 Feb 2004 14:18:29 +0100 (MET) Received: from ms-smtp-03-eri0.ohiordc.rr.com (ms-smtp-03-smtplb.ohiordc.rr.com [65.24.5.137]) by concorde.inria.fr (8.12.10/8.12.10) with ESMTP id i1RDISae013056 for ; Fri, 27 Feb 2004 14:18:28 +0100 Received: from vilya (cpe-024-033-200-041.columbus.rr.com [24.33.200.41]) by ms-smtp-03-eri0.ohiordc.rr.com (8.12.10/8.12.7) with ESMTP id i1RDIP4B029553 for ; Fri, 27 Feb 2004 08:18:26 -0500 (EST) Received: from peuter ([192.168.2.2] ident=mail) by vilya with esmtp (Exim 3.36 #1 (Debian)) id 1Awhsn-0003KO-00 for ; Fri, 27 Feb 2004 08:18:25 -0500 Received: from andrewl by peuter with local (Exim 3.36 #1 (Debian)) id 1Awhsn-0000Eo-00 for ; Fri, 27 Feb 2004 08:18:25 -0500 Date: Fri, 27 Feb 2004 08:18:25 -0500 From: Andrew Lenharth To: caml-list@inria.fr Subject: Re: [Caml-list] complex numbers Message-ID: <20040227131825.GB827@peuter> References: <403EDDD1.6080801@fssg.st-oskol.ru> Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Disposition: inline In-Reply-To: <403EDDD1.6080801@fssg.st-oskol.ru> User-Agent: Mutt/1.5.5.1+cvs20040105i X-Virus-Scanned: Symantec AntiVirus Scan Engine X-Miltered: at concorde by Joe's j-chkmail ("http://j-chkmail.ensmp.fr")! X-Loop: caml-list@inria.fr X-Spam: no; 0.00; caml-list:01 2004:99 bug:01 faq:01 faq:01 beginner's:01 beginners:01 bin:01 caml-bugs:01 ocaml:01 ocaml:01 caml:01 caml:01 alexander:01 groups:01 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk open Complex;; let x = {re = 1.0; im = 1.0};; let y = mul x {re = -1.0; im = -1.0};; let z = norm2 y;; let a = norm x;; The rest of the functions are in the standard library Complex module documentation. This should be enough to get you started. Andrew Lenharth On Fri, Feb 27, 2004 at 09:04:01AM +0300, Alexander Danilov wrote: > Please, show me an example how to work with complex numbers in Ocaml. > I mean, how to create complex number, how to perform orepations (+ - * > /) with complex numbers. > Thanx. > > ------------------- > 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 -- "It will work in practice, yes. But will it work in theory?" --- a french diplomat's comment, recalled by Madeleine Albright ------------------- 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