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:
app.c:(.text+0x18a6): undefined reference to `log'
make: *** [exe0] Error 1

I also tried:
#include math.h
...
x=logf(y)

as a friend from this mail list suggested (thanks!) and then the compilation
was okay but the results of logf were wrong! It does not compute ln or log.

I also tried:
#include math.h
...
x=log(y);

and at Makefile:
CFLAGS +=  -l$/usr/msp430/include

but then I got:
msp430-ld: cannot find -lusr/msp430/include
make: *** [exe0] Error 1

What should I do to use math.h?
Also, in all math.h files I could find there is not such a function as
logf()! So, why is it possible to be compiled?
Sorry for writing again for the same issue.
Regards,
Georgia
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

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
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

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 logf10()...
To show my ignorance I remembered that log was base
10 not ln, so that probably tells you how useful my
information is...

MS


Geo Gkolfin wrote:
 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
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


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 computes the Neperian
logarithm. Excuse me if my comment is irrelevant.
Once again thank you for replying.
Please keep up the good work helping us and the positive energy.
Best regards,
Georgia

On Sun, Jul 31, 2011 at 7:37 PM, Michael Schippling sc...@santafe.eduwrote:

 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 logf10()...
 To show my ignorance I remembered that log was base
 10 not ln, so that probably tells you how useful my
 information is...

 MS


 Geo Gkolfin wrote:

 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.eduTinyos-help@millennium.berkeley.edu
 https://www.millennium.**berkeley.edu/cgi-bin/mailman/**
 listinfo/tinyos-helphttps://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

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. 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 computes the 
 Neperian logarithm. Excuse me if my comment is irrelevant. 
 Once again thank you for replying.
 Please keep up the good work helping us and the positive energy. 
 Best regards,
 Georgia   
 
 On Sun, Jul 31, 2011 at 7:37 PM, Michael Schippling sc...@santafe.edu 
 mailto:sc...@santafe.edu wrote:
 
 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 logf10()...
 To show my ignorance I remembered that log was base
 10 not ln, so that probably tells you how useful my
 information is...
 
 MS
 
 
 Geo Gkolfin wrote:
 
 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
 mailto:Tinyos-help@millennium.berkeley.edu
 
 https://www.millennium.__berkeley.edu/cgi-bin/mailman/__listinfo/tinyos-help
 
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
 
 
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help


[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!
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

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 compute ln(x/y). I tried log(x/y) as in 
 C, but it is not correct. Could someone help me?
 Thanks in advance!
 
 
 
 
 ___
 Tinyos-help mailing list
 Tinyos-help@millennium.berkeley.edu
 https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help
___
Tinyos-help mailing list
Tinyos-help@millennium.berkeley.edu
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help