caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: shiv@mac.com
To: caml-list@inria.fr
Subject: [Caml-list] Complex stuff
Date: Tue, 8 Jan 2002 11:15:26 -0800	[thread overview]
Message-ID: <123971FA-046C-11D6-9430-003065BDAA76@mac.com> (raw)

Sorry to bring this up again ...

I know that the Ocaml team might be implementing complex numbers in 
Ocaml.

However, I need complex support now and I was wondering what the best 
way to proceed would be, if I want to port the code over to the native 
complex support as and when it becomes available?

I need the basic arithmetic and trignometric operations and bigarray 
(complex32, complex64 and fortran layout) support.

I could borrow the basic arithmetic and trignometric stuff from Psilab 
or even Clean libraries. Should I represent complex numbers as tuples or 
record (tuples I guess, since that is what Psilab does)?

What about the bigarray support? The basic stuff I can roll on my own, 
unless somebody else has already done it and can provide me with code. 
How about the bracket notation? Do I need to use camlp4 to get a.{i,j} 
to return a complex number and a.{i,j} <- to store a complex number in 
(i,j)th position (etc..)?

The reason I need the a.{i,j} notation is that I already have real 
number versions of my code and the complex versions will be identical. 
However, for performance reasons I cannot use functors. So I intend to 
do cut-and-paste!

Any advice and/or code will be appreciated.

Thanks,

--shiv--

-------------------
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


             reply	other threads:[~2002-01-08 19:15 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2002-01-08 19:15 shiv [this message]
2002-02-11 10:08 ` 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=123971FA-046C-11D6-9430-003065BDAA76@mac.com \
    --to=shiv@mac.com \
    --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;
as well as URLs for NNTP newsgroup(s).