From: John Max Skaller <skaller@maxtal.com.au>
To: "Post Office!~/sentmail" <fjr6b@cms.mail.virginia.edu>
Cc: caml-list@inria.fr
Subject: Re: [Caml-list] Complex numbers in ocaml
Date: Sun, 23 Sep 2001 03:59:20 +1000 [thread overview]
Message-ID: <3BACD178.92F0CFAE@maxtal.com.au> (raw)
In-Reply-To: <Pine.GSO.4.32.0109211819590.23870-100000@config.mail.Virginia.EDU>
"Post Office!~/sentmail" wrote:
>
> I'm trying to write a system for complex numbers in ocaml for some
> numerical work I'm doing, and I thought I'd ask if anyone else has such
> code already existant.
>
> Otherwise, given an abstract for numbers
> type number = Int of int | Float of float | Complex of float *
> float | Error;;
>
> is there an easy way to coerce numbers back out of type number in order to
> operate on them?
match n with
| Int i -> ..
| Float x -> ...
| Complex (x,y) -> ...
| Error -> ...
--
John (Max) Skaller, mailto:skaller@maxtal.com.au
10/1 Toxteth Rd Glebe NSW 2037 Australia voice: 61-2-9660-0850
New generation programming language Felix http://felix.sourceforge.net
Literate Programming tool Interscript
http://Interscript.sourceforge.net
-------------------
Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/
To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr
next prev parent reply other threads:[~2001-09-22 17:59 UTC|newest]
Thread overview: 9+ messages / expand[flat|nested] mbox.gz Atom feed top
2001-09-21 22:25 Post Office!~/sentmail
2001-09-22 17:59 ` John Max Skaller [this message]
-- strict thread matches above, loose matches on Subject: below --
2001-03-27 17:49 [Caml-list] Complex numbers in OCaml Arturo Borquez
2001-03-27 16:22 wester
2001-03-27 17:19 ` Markus Mottl
2001-03-27 17:48 ` Jan Skibinski
2001-03-27 19:25 ` Markus Mottl
2001-03-28 1:04 ` Michael Hohn
2001-03-29 14:26 ` Xavier Leroy
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=3BACD178.92F0CFAE@maxtal.com.au \
--to=skaller@maxtal.com.au \
--cc=caml-list@inria.fr \
--cc=fjr6b@cms.mail.virginia.edu \
/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