Wanderer wrote:
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.<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).
DaveaA -- http://mail.python.org/mailman/listinfo/python-list