caml-list - the Caml user's mailing list
 help / color / mirror / Atom feed
From: Bruce Hoult <bruce@hoult.org>
To: "David McClain" <dmcclain1@mindspring.com>, <caml-list@inria.fr>
Subject: Re: [Caml-list] Complex Arithmetic
Date: Wed, 28 Mar 2001 19:47:46 +1200	[thread overview]
Message-ID: <a04310101b6e7463c7b6d@[192.168.0.12]> (raw)
In-Reply-To: <002701c0b757$aefbcff0$210148bf@dylan>

At 12:21 AM -0700 3/28/01, David McClain wrote:
>Borda's Mouthpiece requires taking the square root of the square of values
>along the negative imaginary axis. When you square (0 - 1i) you get (-1).
>...but actually you get (-1 + 0-). Most languages simply accept the square
>as (-1) = (-1 + 0+).
>
>Taking the subsequent square root when you have made this incorrect
>assumption gives the value sqrt(-1) -> (0+1i). And so the stream line mapped
>from the negative imaginary axis ends up cutting across all the other stream
>lines when this condition is encountered. An obvious error!
>
>The correct answer is obtained by noting that (0 - 1i)^2 -> (-1 + 0-) and
>sqrt(-1 + 0-) -> (0 -1i) again. Only by properly considering the nature of
>floating point zero (i.e., which of the two you really have) can you perform
>this computation correctly.

I guess I'm just dense, but I don't see how you generalize this.

I mean, OK, if you want to also say that (-1, 0)^2 -> (1, 0-) so that 
you can then do sqrt(1, 0-) -> (-1, 0) instead of (1, 0) then I guess 
I could live with this.

But how do you deal with all the other complementary pairs?  I mean, 
how do you distinguish the results of, say (4 + 5i)^2 and (-4 - 5i)^2 
-- both of which are (-9 + 40i) -- so that when you do sqrt(-9 + 40i) 
you get the number you started with rather than always the principle 
one?

I'm afraid I just don't see it.

-- Bruce
-------------------
To unsubscribe, mail caml-list-request@inria.fr.  Archives: http://caml.inria.fr


  reply	other threads:[~2001-03-28  7:48 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2001-03-28  7:21 David McClain
2001-03-28  7:47 ` Bruce Hoult [this message]
2001-03-28  8:16   ` David McClain
2001-03-28  7:37 David McClain
2001-03-28 16:14 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='a04310101b6e7463c7b6d@[192.168.0.12]' \
    --to=bruce@hoult.org \
    --cc=caml-list@inria.fr \
    --cc=dmcclain1@mindspring.com \
    /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).