# MATLAB: Is floor(2.00000000) giving me a result of 1

floortruncation error

Hello everyone,
I have a homework from a MOOC in which for the function I have to "dissect" the digits of a number to see if it is a palindromic number; so far I don't know of any built-in function that does that so I found a way to do it "manually" and it is actually supposed to work if floor() gives me the correct result.
I took a screenshot to post it (the greyed-out part is for the other forum), and there you can see a reproduction fo the calculations being carried out in the function for the problematic case. Why is this happening? I can't find a reason in the documentation.
What I'm doing here is taking a number—12 in this case—and creating a vector with its digits, but I can't go any further for the other digit because the first one is wrong. The variable names are not descriptive, only for me they are, but I think you can see what I'm trying to do.
>> mul = 2*6mul =    12>> XVY = 10XVY =    10>> XVZ = mul/XVYXVZ =    1.2000>> XVZ_1 = floor(XVZ)XVZ_1 =     1>> XVW = 1.2 - XVZ_1XVW =    0.2000>> T1 = XVW*10T1 =    2.0000    <-- 0's printing after decimal point means number is not exactly 2>> floor(T1)ans =     1>> num2strexact(XVZ)ans =1.1999999999999999555910790149937383830547332763671875>> num2strexact(XVW)ans =0.1999999999999999555910790149937383830547332763671875>> num2strexact(T1)ans =1.999999999999999555910790149937383830547332763671875