On Mar 24, 2009, at 2:34 AM, Nouha Baccour wrote:

> Hi all,
>
> I am programming with Tinyos/TOSSIM 2. Particularly I am working on
> CTP data collection protocol.
>
> Meanwhile, I needed to define float (or double) variables. I found
> many problems like "floating point exception", other issues related to
> casting...
> Finally I was able to integrate my float variables. However, I don’t
> know what are the consequences of defining these float variables.
> In fact, I remarked that tinyos community avoids using floats or
> double. For example, for the PRR (packet reception ratio) that can be
> found in LinkEstimationP.nc, the authors, multiply PRR by 100 in order
> to have integer (uint8_t) PRR, between 0 and 100, instead of float
> PRR, between 0 and 1!!!
> This is just an example but there are more.
>
> So I would like to know what is the problem by using real variables.

Microcontrollers typically don't have floating point support, so it's  
all in software. This makes floating point operations slow.

Phil
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to