Floating point

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

Floating point

2,805 次查看
ppcco
Contributor I
I need to do an equation y = m*x + b where m, x and b are float, in Codewarrior i'm trying use floatf(x,y), but when try compile it shows "symbol powf in file xxxxxxxx is undefined", the header file math.h was included, anybody can help me?
 
Best regards
 
Francisco
标签 (1)
0 项奖励
回复
3 回复数

930 次查看
CompilerGuru
NXP Employee
NXP Employee
Check the readme.txt in the lib/hc08c folder if you are linking the right library.
Try to create a new project with the wizard, be careful to choose the right floating point support, add your code in there and see if it works.
"powf" is not refered to because of some floating point additions or multiplications, is this the actual name you get, or do you call this function?
If all this fails, can you show the complete code you added to the wizard generated project?

Daniel
0 项奖励
回复

930 次查看
ppcco
Contributor I
Thanks Daniel, really when create new project with the wizard, my problem was solve, best regards.
 
Francisco
0 项奖励
回复

930 次查看
Alban
Senior Contributor II
Hello,
 
This is a CodeWarrior question. It should be asked in CodeWarrior board.
But someone already did a few months ago and an answer is there.
 
Include files are not the same for floating points and it can be done manually by following the procedure explained at the time.
 
By using the search engine at the bottom with cleverly chosen keywords you will find that post.
 
Cheers,
Alban.
0 项奖励
回复