I dont whether its a stupid question or not, but I am stucked in a very
simple equation,

uint32_t latest
uint32_t packetsLost
uint32_t packetsSend

latest =0;
packetsLost = 0 ;
packetsSend = 0;

printf("latest:%u\n",latest);printfflush();

latest = 100*packetsLost/packetsSend;

printf("latest:%u\n",latest);printfflush();

out is :

latest : 0
latest : 65536


can any one please tell me what is wrong why after the division its giving
65535 where as if I simply do :

latest = 100*0 / 0

output is 0
Wasif Masood
_______________________________________________
Tinyos-help mailing list
[email protected]
https://www.millennium.berkeley.edu/cgi-bin/mailman/listinfo/tinyos-help

Reply via email to