Classic Crenshaw: Rooting for "Integer Square Roots" - Embedded.com

# Classic Crenshaw: Rooting for “Integer Square Roots”

Some articles from the old Embedded Systems Programming magazine are still helpful to readers but just need a little TLC. Occasionally, readers write us asking for old articles that either aren't online or have fallen into “disrepair” after surviving many site redesigns.

Want a technique for finding integer square roots? On October 24, 2008, Peter Butler asked us to fix February 1998 Programmer's Toolbox column called “Integer Square Roots” because, as he said:

Ten years is a long time for a technical article to remain useful. I first found your “Integer Square Roots” page while trying to setup acceleration ramps for stepper motors. Although that effort soon became stillborn, I remember your page.

I may yet use your article for solving the quadratic equation for computing temperature from platinum resistance thermometers. On the other hand, I may define a few points on the (temperature, resistance) curve and do linear interpolation. This is not unreasonable because the temperature squared term is small.

But my reason for writing is that your various listings in your article have become corrupted. In particular all your “<" characters are now the first and only character on separate lines. (HTML conversion problem?) And the line after the last "else" in listing 4 is corrupted. It reads "root½." In case my email program messes up that its "rooty" with a small accent mark over the "y."

Oh yes, years ago I remember a base 2 log function that was suitable for microcontrollers. Have you any idea where I might find it again?

Thanks for the useful math,
-Peter Butler

We've refreshed the article so now it's easier to read. Take a look at www.eetimes.com/4219659 and let me know if you find other useful articles that need a makeover.

Jack Crenshaw is a systems engineer and the author of Math Toolkit for Real-Time Programming. He holds a PhD in physics from Auburn University. E-mail him at jcrens@earthlink.net. For more information about Jack click here

## 1 thought on “Classic Crenshaw: Rooting for “Integer Square Roots””

This site uses Akismet to reduce spam. Learn how your comment data is processed.