Re: [Tinyos-help] Logarithmic function

2011-07-31 Thread Geo Gkolfin
Firstly, excuse me for insisting so much on this, but I really do not know what to do. I use telosb motes and an external sensor and I need to use the natural logarithmic function in order to convert the adc value of the sensor. I tried: #include math.h ... x=log(y); but at make I get:

Re: [Tinyos-help] Logarithmic function

2011-07-31 Thread Geo Gkolfin
Oops, my bad! Actually logf() works fine. It computes ln correctly. I still cannot find it in any of the math.h files but it works. Sorry again. ___ Tinyos-help mailing list Tinyos-help@millennium.berkeley.edu

Re: [Tinyos-help] Logarithmic function

2011-07-31 Thread Michael Schippling
I have two different versions of msp430 tools courtesy of different mystery TOS installations, one in /usr and one in /opt. They both have the same directory structure, so the only math.h file I could find was: .../msp430/msp430/include/math.h Both contain a logf() declaration, and a

Re: [Tinyos-help] Logarithmic function

2011-07-31 Thread Geo Gkolfin
Dear Mr Michael Schippling Thank you so much for both your help and your irony. I am afraid I was looking at avr! After your enlightening reply I was able (at last) to find logf. Unfortunately I cannot understand the base 10 ironic part of your mail. But logf(2.718) returns 1 so I guess logf

Re: [Tinyos-help] Logarithmic function

2011-07-31 Thread Michael Schippling
The base10 log ironic part was a reference to how bad my memory is of math functions that I don't often use... I also forgot that avr math.h uses doubles... hope things keep working for you MS Geo Gkolfin wrote: Dear Mr Michael Schippling Thank you so much for both your help and your irony.

[Tinyos-help] Logarithmic function?

2011-07-29 Thread Geo Gkolfin
Hello, I am using a telosb mote and I am trying to convert the adc value of an external temp sensor in Celsius. The conversion formula uses the logarithmic function. I need to compute ln(x/y). I tried log(x/y) as in C, but it is not correct. Could someone help me? Thanks in advance!

Re: [Tinyos-help] Logarithmic function?

2011-07-29 Thread Michael Schippling
there may be a logf(float) function. Look in the relevant math.h file to see what's what. MS Geo Gkolfin wrote: Hello, I am using a telosb mote and I am trying to convert the adc value of an external temp sensor in Celsius. The conversion formula uses the logarithmic function. I need to