Adrian Lita

Square root approximate calculation function for 32bit embedded C

By: Adrian Lita

Published on: 2018-07-23

Keywords: #sqrt #fast-sqrt #c #embedded #32bit #snippet

 

These days I needed to implement in an embedded algorithm a simple RMS (Root Mean Squre) calculation over an analog-to-digitally converted signal. My most eager and resource consuming problem was, after the efficient accumulation of data (calculating the sum of squares), I needed to extract the square root. After a couple of Google searches, I found the Newtonian method for calculating the square root pretty effective, and I also found a C-implementation that I'm sharing with you (credits go...

Read More >