Floating point

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Floating point

2,806件の閲覧回数
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 返答(返信)

931件の閲覧回数
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 件の賞賛
返信

931件の閲覧回数
ppcco
Contributor I
Thanks Daniel, really when create new project with the wizard, my problem was solve, best regards.
 
Francisco
0 件の賞賛
返信

931件の閲覧回数
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 件の賞賛
返信