"Neat" Rectangular to Polar Conversion Algorithm

Rick LyonsNovember 15, 20105 comments

The subject of finding algorithms that estimate the magnitude of a complex number, without having to perform one of those pesky square root operations, has been discussed many times in the past on the comp.dsp newsgroup. That is, given the complex number R + jI in rectangular notation, we want to estimate the magnitude of that number represented by M as:

On August 25th, 2009, Jerry (Mr. Wizard) Avins posted an interesting message on this subject to the comp.dsp newsgroup (Subject: "Re: Complex versus real numbers"). In his message Jerry said that in the ol' days before hand calculators, experienced slide rule users performed rectangular-to-polar conversion using:

I'm not rightly sure why the algorithm in Eq. (2) seemed so startling, and appealing, to me. Maybe because it (surprisingly) seemed to translate a square root operation into forward/inverse trigonometric, and ratio, operations. (All of which could be performed on a slide rule.) In any case, this "neat" algorithm, as they say in the U.S. Military, "works fine and lasts a long time."

Can you figure out why Eq. (2) is true? Once you do, you'll see a good example of how a simple idea can appear to be complex, ... oops, I mean complicated.

[ - ]
Comment by tjcNovember 17, 2010
I spent a while looking at Eq. (2) wondering why you'd ever want to make that conversion in practice, and then I read on and saw the comment about slide rules. I'm in my early 20's and I'm currently working as a digital hardware engineer, so I immediately started thinking in terms of CORDIC and such. Always good to be reminded that not every problem is solved with transistors :) --Tom
[ - ]
Comment by steveuNovember 20, 2010
These are the kinds of expressions we learned in the early days of trig at school, forgot after the exams, and constantly struggle to reinvent when we need then. :-) I find "Can you figure out why Eq. (2) is true?" an odd question. Its a neat expression, but its blatantly obvious just why it works once you've seen it.
[ - ]
Comment by FatherTorqueJanuary 19, 2011
Thats a good trick (especially for slide ruler - you don't need to remember items to sum them, you just do one operation after another) - but it may be essential to clarify, that tan^(-1) here is not like 1/tan(), but its like arctan(), i.e. getting angle from its tangent.
[ - ]
Comment by eephdFebruary 1, 2011
Good old Pythagoras theorem. You put it very aptly, simple things can indeed appear complicated.
[ - ]
Comment by fpgaplayerApril 4, 2011
why Eq. (2) is true, How humorous Mr Lyons is. haha,I know IQ/(I^2+0.28125*Q^2), but I hate div , so I like CORIDIC better.

To post reply to a comment, click on the 'reply' button attached to each comment. To post a new comment (not a reply to a comment) check out the 'Write a Comment' tab at the top of the comments.

Please login (on the right) if you already have an account on this platform.

Otherwise, please use this form to register (free) an join one of the largest online community for Electrical/Embedded/DSP/FPGA/ML engineers: