Hopefully not. Did you notice that the result is just plain wrong? I mean, not only "off" by one ulp, but wrong?
which, of course, doesn't solve the problem, but only masks it. You get other round-off errors, and in most cases, worse round-off errors because, internally, the system still works in binary.
What we have here is just a bug. Ok, that stuff happens, but I wonder where the thousands of test cases were?
Uh yeah, I was referring to the 6.499999... In the calculator he had 1.1-1, so it's still floating point rounding error...and again why I use DECIMAL vs single/float/double in code.
In fact, I read somewhere that when a float would return X.99999...It should be considered a whole number (X+1). That's why lots of code I've seen use Round(x,y) functions around float/double calculations specifying how many digits right of the decimal point they want to see...and again why I prefer to use DECIMAL data-types.