Square Root Calculation

取消
显示结果 
显示  仅  | 搜索替代 
您的意思是: 
已解决

Square Root Calculation

跳至解决方案
1,784 次查看
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 ?

标记 (1)
0 项奖励
回复
1 解答
1,147 次查看
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 项奖励
回复
1 回复
1,148 次查看
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 项奖励
回复