How do I Block Events in wxPython

Dave Angel davea at ieee.org
Wed Dec 9 17:10:51 EST 2009


Wanderer wrote:
> <snip>
>
> Found another strange bug (Strange to me, anyway). int(0.8 * 10.0) 7. Had to change the code to int(0.8 * 10.0 + 0.0001).
>
>
>   
Floating point is intrinsically imprecise.  The value 0.8 cannot be 
exactly represented in IEEE fp notation (binary).  One answer is to 
round() the result before converting to int.


DaveaA




More information about the Python-list mailing list