Christian Heimes <li...@cheimes.de> added the comment: Welcome to the astounding world of IEEE 754 floating point operations. Python's float type is based on C's 64bit double precision float. The value in _math.c is as precise as a double is able to contain:
>>> 0.6931471805599453094172321214581 == 0.693147180559945286227 True >>> 0.6931471805599453094172321214581 0.6931471805599453 >>> 0.693147180559945286227 0.6931471805599453 Strictly speaking any of the numbers in your initial message are wrong. It's not possible to express ln2 is a number of finite length. The approximations are usually good enough, though. ---------- nosy: +christian.heimes _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue32783> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com