>? int(2.050000000000000044*100) && 205 >? int(2.050000000000000043*100) && 204 >>Both values are clearly greater than 205. Yet, the second line will report 204. And that's entirely correct, because the integer part of the second line is 204. INT() is usually misused as a way to remove fractions, but that is NOT what INT() does. If you want to remove fractions, use ROUND(,0), always, ever! If you want to case a floating point to an integer use INT().
SELECT FLOOR(2.050000000000000044*100) -- 205 SELECT FLOOR(2.050000000000000043*100) -- 205Here MSSQL is correct on this case.
? int(2.0500000000*100) && 205 ? int(2.05000000000*100) && 204 !!!!!A conversion round error is acceptable,
if x>=y and f() is monotonically increasing then f(x)>=f(y)Because
? 2.050000000000000043 >= 2.05 && true ? int(2.050000000000000043*100) >= int(2.05*100) && falsethen conversion is bad!