I wrote a small piece of code that rounds a number to the closest multiple of 0.005
but it produces a weird output, that I didn't expect.
I am using Python version 3.7.3
Here is the code:
number = 1.639
print(5 * round(number / 5, 3))
Output
1.6400000000000001
Expected output
1.64
Check this replit for detailed output on different values.
Can anyone tell me why this happens?