New submission from Pedro Gimeno <pgpyb-4...@personal.formauri.es>:
>>> float.fromhex('0x0.8p-1074') 0.0 >>> float.fromhex('0x.8p-1074') 5e-324 One of them is obviously wrong. It's the second one, because: - The smallest denormal is 0x1p-1074 - Therefore, 0x0.8p-1074 is a tie for rounding purposes. - The digit in the last place is even because the number is zero, and there is a tie, which implies rounding down. ---------- components: Library (Lib) messages: 399909 nosy: pgimeno priority: normal severity: normal status: open title: Bug in float.fromhex versions: Python 3.9 _______________________________________ Python tracker <rep...@bugs.python.org> <https://bugs.python.org/issue44954> _______________________________________ _______________________________________________ Python-bugs-list mailing list Unsubscribe: https://mail.python.org/mailman/options/python-bugs-list/archive%40mail-archive.com