Re: [Tinyos-help] Fwd: errors casting int64_t to float on MSP430

2012-10-03 Thread Flemming Nyboe
Update: On Tue, Sep 18, 2012 at 10:45 PM, Eric Decker cire...@gmail.com wrote: try using the 4.6.3 compiler. 3.2.3 is really old. OK, since I'm on cygwin, I had to settle with the 4.5.3, patched thru 2012-02-28 from here http://tinyos.stanford.edu/tinyos/dists/cygwin/ That made a

Re: [Tinyos-help] Fwd: errors casting int64_t to float on MSP430

2012-10-03 Thread Flemming Nyboe
Update II: On Wed, Oct 3, 2012 at 12:16 PM, Flemming Nyboe flemm...@rocketscience.eu wrote: How does this reproduce on 4.6.3? It seems the answer is here: https://www.millennium.berkeley.edu/pipermail/tinyos-help/2012-October/055752.html It has been fixed in 4.6.3. What is involved in creating

Re: [Tinyos-help] Fwd: errors casting int64_t to float on MSP430

2012-09-20 Thread Flemming Nyboe
Hello Eric, On Tue, Sep 18, 2012 at 10:45 PM, Eric Decker cire...@gmail.com wrote: try using the 4.6.3 compiler. 3.2.3 is really old. Thank you, I will. The package is for debian, and I am on cygwin/Windows 7. Should that work too? Regards Flemming

Re: [Tinyos-help] Fwd: errors casting int64_t to float on MSP430

2012-09-20 Thread Eric Decker
I beleive you can convert using alien. On Thu, Sep 20, 2012 at 6:22 AM, Flemming Nyboe flemm...@rocketscience.euwrote: Hello Eric, On Tue, Sep 18, 2012 at 10:45 PM, Eric Decker cire...@gmail.com wrote: try using the 4.6.3 compiler. 3.2.3 is really old. Thank you, I will. The package

[Tinyos-help] Fwd: errors casting int64_t to float on MSP430

2012-09-18 Thread Flemming Nyboe
Hello, On the MSP430, all floating points types are 32 bit. A cast from int64_t to float produces strange results: Negative values are rounded to multiples of -256 (tested for -1 to 0) Positive numbers smaller than 8725651e09 (8.7e15) are converted correctly, tested at 0.1% intervals. Above

Re: [Tinyos-help] Fwd: errors casting int64_t to float on MSP430

2012-09-18 Thread Eric Decker
try using the 4.6.3 compiler. 3.2.3 is really old. It isn't clear what level of support for floating point exists. Peter (the current msp430 gcc maintainer) will have more information. But do try 4.6.3 first. You can get it in the msp430-46 package at

Re: [Tinyos-help] Fwd: errors casting int64_t to float on MSP430

2012-09-18 Thread Michael Schippling
With a 32 bit float you get 24 bits of value and 8 bits of sign so converting from an integer of larger than 24 bits will entail some resolution truncation. MS On 9/18/2012 2:45 PM, Eric Decker wrote: try using the 4.6.3 compiler. 3.2.3 is really old. It isn't clear what level of support