Since float is an approximate datatype, you may get rounding errors like this. In this case the rounding error is magnified due to the boundary between 56.999999999999993 and 57.
If you use decimal you'll get consistent results.
HTH
Ewan If you have found this post helpful, please click the 'Vote as Helpful' link (the green triangle and number on the top-left).
If this post answers your question, click the 'Mark As Answered' link below. It helps others who experience the same issue in future to find the solution.
Marked as answer byZongqing LiTuesday, October 20, 2009 8:58 AM