Floating point

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

Floating point

2,208 Views
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
Labels (1)
0 Kudos
3 Replies

333 Views
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 Kudos

333 Views
ppcco
Contributor I
Thanks Daniel, really when create new project with the wizard, my problem was solve, best regards.
 
Francisco
0 Kudos

333 Views
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 Kudos