Actually I don't think this is about floating point representation, but math itself. :) As weird as it might seem, 0.99999999999... (to infinity) actually equals to 1. 1 / 3 is 0.3333333333333........ (to infinity) 0.3333333........ * 3 equals to 0.99999..... which is 1. Think of it this way: (1 / 3) * 3 = 1 On Sep 19, 2010, at 6:05 AM, Lucas Samaruga wrote: thanks, I should study the floating point representation in this cases. |