# Weird Floating Point operation

In this code,I try to separate the integer part and fractional part from the floating point number Eg: let consider if I divide 1.000000 by 0.000005,I get result as 200000.000000 From the result,I need to separate the integer part and fractional part and store it in variable separately i.e. result = 200000.000000 integer_part = 200000; fractional part = 0.000000; But instead of getting 200000 as integer part,I got 199999.I don't know why it interpret wrongly. But if you divide the 1.000000 by 0.000006,it correctly separate the fractional part and integer part i.e result = 166666.666667 integer_part = 166666 Fractional_part = 0.666667 what is the reason behind it? https://sololearn.com/compiler-playground/cAFLK3sPRq2J/?ref=app