From: Gunther Diemant Date: 2011-12-15T20:21:46+09:00 Subject: Re: round float to integer if whole number > That test does not work reliably: You're right, but floating point numbers don't work reliably (as one can see in your examples, one has always conversion and rounding errors) Nonetheless if one has to work with floating point numbers it is surly better to define equality in terms of some delta error tolerance.