Following is the output of what I did in the python terminal.
math.modf(45.332)
(0.33200000000000074, 45.0)
So I felt that it was weird .... tried to mimic this modf function and got the same result..
k=lambda x : x-float(math.floor(x))
k(5.5)
0.5
k(45.332)
0.33200000000000074
Note : This is happening only when the floating point has more than 1 digit