Skip to content
Advertisement

Tag: floor-division

How is floor division not giving result according to the documented rule?

Why floor division is not working according to the rule in this case? p.s. Here Python is treating 0.2 as 0.20000000001 in the floor division case So (12/0.2000000001) is resulting in 59.999999… And floor(59.999999999) outputting 59 But don’t know why python is treating 0.2 as 0.2000000001in the floor division case but not in the division case? Answer The reason why

Advertisement