[New-bugs-announce] [issue37787] Minimum denormal or ** bug

Kevin Braun report at bugs.python.org
Wed Aug 7 11:32:45 EDT 2019


New submission from Kevin Braun <kevin.t.braun at gmail.com>:

Python 3.7.3 (v3.7.3:ef4ec6ed12, Mar 25 2019, 22:22:05) [MSC v.1916 64 bit (AMD64)]

I believe 2**-1074 is the smallest denormalized number for Python on my system (Windows), so I would expect 2**-1075 to yield 0.0, but it does not.  Instead:
>>> 2**-1074==2**-1075
True
>>> (2**-1074).hex()
'0x0.0000000000001p-1022'
>>> (2**-1075).hex()
'0x0.0000000000001p-1022'

And, the above is not consistent with the following:
>>> (2**-1074)/2
0.0
>>> (2**-1074)/2 == 2**-1075
False
>>> 1/2**1075
0.0
>>> 1/2**1075 == 2**-1075
False

Given the above observations, I suspect there is a bug in **.

----------
components: Interpreter Core
messages: 349168
nosy: Kevin Braun
priority: normal
severity: normal
status: open
title: Minimum denormal or ** bug
type: behavior
versions: Python 3.7

_______________________________________
Python tracker <report at bugs.python.org>
<https://bugs.python.org/issue37787>
_______________________________________


More information about the New-bugs-announce mailing list