Hello!
I am using telosb motes and tinyos-2.1.0. I have an application in which
some floating point operations are done and I wish to print (using
PrintfClient) only the decimal part of the result. Since the printed value
is not what it should be -it is always 65535- I wrote a simple program where
Thanks for your answer!
Actually it almost worked!
%lu prints 3354000128 instead of 3354000112.
%lx prints c7e9fb00 which is 3354000128 hex.
This can drive you crazy! Any ideas please?
On Thu, Aug 18, 2011 at 12:58 AM, Michael Schippling wrote:
> That is a little odd...
>
> I guess the implicit c
On Fri, Aug 19, 2011 at 11:32 AM, Geo Gkolfin wrote:
> Thanks for your answer!
> Actually it almost worked!
> %lu prints 3354000128 instead of 3354000112.
> %lx prints c7e9fb00 which is 3354000128 hex.
> This can drive you crazy! Any ideas please?
>
Without explicitly stepping through the code a
There are not so many steps to be made. The functionality is described in my
first mail.
On Fri, Aug 19, 2011 at 9:38 PM, Eric Decker wrote:
>
>
> On Fri, Aug 19, 2011 at 11:32 AM, Geo Gkolfin wrote:
>
>> Thanks for your answer!
>> Actually it almost worked!
>> %lu prints 3354000128 instead of
ahI think the number of significant digits for a float is 24 bits
so the cast may be rounding. See:
http://en.wikipedia.org/wiki/Floating_point#Rounding_modes
MS
Geo Gkolfin wrote:
> There are not so many steps to be made. The functionality is described
> in my first mail.
>
>
> On Fr