From: Andrew Lenharth <alenhart@cs.ohiou.edu>
To: caml-list@inria.fr
Subject: Re: [Caml-list] complex numbers
Date: Fri, 27 Feb 2004 08:18:25 -0500 [thread overview]
Message-ID: <20040227131825.GB827@peuter> (raw)
In-Reply-To: <403EDDD1.6080801@fssg.st-oskol.ru>
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
next prev parent reply other threads:[~2004-02-27 13:18 UTC|newest]
Thread overview: 7+ messages / expand[flat|nested] mbox.gz Atom feed top
2004-02-27 6:04 Alexander Danilov
2004-02-27 13:18 ` Andrew Lenharth [this message]
2004-02-27 16:36 ` Christophe TROESTLER
[not found] ` <20040227131719.GA827@peuter>
[not found] ` <403F5ABD.1090402@fssg.st-oskol.ru>
2004-02-27 15:36 ` Andrew Lenharth
-- strict thread matches above, loose matches on Subject: below --
2003-04-09 10:59 [Caml-list] Complex Numbers David Gray
2003-04-09 11:53 ` sebastien FURIC
2001-03-28 2:19 David McClain
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=20040227131825.GB827@peuter \
--to=alenhart@cs.ohiou.edu \
--cc=caml-list@inria.fr \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox