Square Root Calculation

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Square Root Calculation

Jump to solution
1,203 Views
drummer
Contributor IV

I need to do statistical analysis (standard deviation) on analog voltage samples collected every second.

I am using an MCF52259 custom board with MQX.

I found that after improving the Ethernet radiated EMI my A-D converter became much more stable.

How do you do a square root operation on an int_32 ?

Tags (1)
0 Kudos
1 Solution
566 Views
timias
Contributor IV

#include <math.h>

sqrt

but it is possible that the needed math function wasn't included in your precompiled library. So in project settings under linker you may need to change your "c" library to a different one. For example the one the default projects pick for my processor is:

"${PAToolsBaseDir}/PA_Support/ewl/lib/libc_E200z760_VLE.a"

I needed to switch to

"${PAToolsBaseDir}/PA_Support/ewl/lib/libc99_E200z760_VLE.a" - the regain some left out functions. The docs in the help folder under your Codewarrior install should help, assuming you as using Codewarrior.

View solution in original post

0 Kudos
1 Reply
567 Views
timias
Contributor IV

#include <math.h>

sqrt

but it is possible that the needed math function wasn't included in your precompiled library. So in project settings under linker you may need to change your "c" library to a different one. For example the one the default projects pick for my processor is:

"${PAToolsBaseDir}/PA_Support/ewl/lib/libc_E200z760_VLE.a"

I needed to switch to

"${PAToolsBaseDir}/PA_Support/ewl/lib/libc99_E200z760_VLE.a" - the regain some left out functions. The docs in the help folder under your Codewarrior install should help, assuming you as using Codewarrior.

0 Kudos