Eric V. Smith <e...@trueblade.com> added the comment:

This isn't a bug. It's due to the base 2 representation of floating point 
numbers. See for example: See 
https://docs.python.org/3/tutorial/floatingpoint.html

It's possible, depending on your use case, you might want to use the decimal 
module. But that has it's own issues that you should be aware of. For example, 
1/7 is not exactly representable in either floats or Decimals.

----------
nosy: +eric.smith
resolution:  -> not a bug
stage:  -> resolved
status: open -> closed

_______________________________________
Python tracker <rep...@bugs.python.org>
<https://bugs.python.org/issue42148>
_______________________________________
_______________________________________________
Python-bugs-list mailing list
Unsubscribe: 
https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com

Reply via email to