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 KAA25627; Wed, 28 Mar 2001 10:17:05 +0200 (MET DST) 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 KAA25623 for ; Wed, 28 Mar 2001 10:17:04 +0200 (MET DST) Received: from maynard.mail.mindspring.net (maynard.mail.mindspring.net [207.69.200.243]) by concorde.inria.fr (8.11.1/8.10.0) with ESMTP id f2S8H2T01343 for ; Wed, 28 Mar 2001 10:17:02 +0200 (MET DST) Received: from dylan (1Cust105.tnt4.tucson.az.da.uu.net [63.11.145.105]) by maynard.mail.mindspring.net (8.9.3/8.8.5) with SMTP id DAA00946; Wed, 28 Mar 2001 03:16:29 -0500 (EST) Message-ID: <005d01c0b75f$714aaf70$210148bf@dylan> From: "David McClain" To: "Bruce Hoult" , References: <002701c0b757$aefbcff0$210148bf@dylan> Subject: Re: [Caml-list] Complex Arithmetic Date: Wed, 28 Mar 2001 01:16:49 -0700 MIME-Version: 1.0 Content-Type: text/plain; charset="iso-8859-1" Content-Transfer-Encoding: 7bit X-Priority: 3 X-MSMail-Priority: Normal X-Mailer: Microsoft Outlook Express 5.00.2919.6600 X-MimeOLE: Produced By Microsoft MimeOLE V5.00.2919.6600 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk > 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 think the easiest way to begin is to convert to polar form in your head. Then you can see where the results belong. Take (4+5i) for example. This is a ray in Quadrant I of the complex plane. Squaring it puts it into Quadrant II, and the subsequent square root moves it back to Quadrant I. On the other hand, (-4-5i) is a ray in Quadrant III. Depending on how you view it, in terms of Riemann sheets you can either see this as r * Exp[theta] with theta > pi, or else r * Exp[theta] with -pi < theta < 0. By convention we use the principal sheet with angles between -pi <= theta <= pi. So in this interpretation, squaring this number would put you on the next sheet down (in the negative theta direction, which lies beneath Quadrant II. Taking the square root moves you right back into Quadrant III on the principal sheet. Translating this into rectangular form... this particular example is problematic, because we have gone beyond the principal Riemann sheet. And so rectangular representation cannot give the correct answer and Kahan's principal is clearly illustrated -- i.e., that the language of pairs is insufficient for complex arithmetic. Borda's Mouthpiece represents a boundary case in which arithmetic stays entirely in the prinicipal Riemann sheet. and so all arithmetic should behave itself in rectangular form as long as proper attention is paid to the nature of zero. Your example pushes beyond even this. And so only the polar form can be used to get the correct answer. - DM ------------------- To unsubscribe, mail caml-list-request@inria.fr. Archives: http://caml.inria.fr