You are here

how to implement floating point computing such as 'log'? | Cypress Semiconductor

how to implement floating point computing such as 'log'?

Summary: 3 Replies, Latest post by PSoC Rocks on 18 Oct 2012 01:20 PM PDT
Verified Answers: 0
Last post
Log in to post new comments.
ldy's picture
1 post

hello, I am a custermor who use your product CYCKIT-050 development KIT. I want to do some floating point computing on such chip. I could run your demo project like ADC_DAC, LCD, etc...

However when I implement a program used y=log(x), the compiler showed error and fail to compile. I have already include "math.h" in my project:

#include <device.h>
#include <math.h>

void main()

{ float y,x;



It compiled wrong in the PSoC Creator 2.1 enviroment! but when I write y=log(10); the compiling seemed ok. Such problem really confused me, please help me out!!

DPAK's picture
2 posts

Try this:

Goto Project > Build Settings > Linker > General > Additional Libraries.

Now type m in the Additional Libraries field. 

You could also refer to this KB article:

user_1377889's picture
9241 posts


Congratulations! Your first post and a quite correct, prompt and complete one!



PSoC Rocks's picture
141 posts

This math library supports log10() function as well.




Log in to post new comments.