log function in C

Questions about the BASICtools and MakeItC
Post Reply
YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

log function in C

Post by YahooArchive »

I need to basically do this.

float MyTag;
MyTag = 20*LOG10(i/1);

I was looking for a math.c file to include in the header but could not find it.
Do I need a file to link to in order to use the Log function? How do I use a
Log base 10 formula?

Thanks in advance.



YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: log function in C

Post by YahooArchive »

Got it. I could not find the math.h file online for download nor in the
Coridium download. Is there a site to download .h files? I found one on my
computer that was from an Arduino package, it seems to work fine. So problem
fixed, but I would like to know how I could get these header files in the
future.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: log function in C

Post by YahooArchive »

I found math.h in by searching the coridium folder

Haven't used it yet but I believe the math libraries are pre-compiled in the gcc
setup.

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: log function in C

Post by YahooArchive »

I did not find math.h when I did a search in the Coridium folder. Do I
need to re-download something?

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: log function in C

Post by YahooArchive »

I think you need to re-do your search, there are 3 copies I see, one in a c++
directory so probably ignore that one

arm-none-eabi\include

arm-none-eabi\sys-include

both have a math.h

YahooArchive
Posts: 1462
Joined: Fri Oct 19, 2012 5:11 am

Re: log function in C

Post by YahooArchive »

Ahh, yes. I see them now. I was looking in a different Coridium directory
that I created. I will have to straighten out my directories. Thanks.

Post Reply