<p dir="auto">According to this program any value between ...cde0 and ...cdef is equal to uint64 value of ...cdef which was a big surprise</p>
<div class="snippet-clipboard-content notranslate position-relative overflow-auto" data-snippet-clipboard-copy-content="import numpy
a = numpy.uint64(0x1234567890abcdef)
if a == 0x1234567890abcde0:
    print(&quot;BUG!&quot;)"><pre class="notranslate"><code class="notranslate">import numpy
a = numpy.uint64(0x1234567890abcdef)
if a == 0x1234567890abcde0:
    print("BUG!")
</code></pre></div>
<p dir="auto">Seems like uint64 is converted to float even when it is compared against standard integers which was another big surprise for me.</p>
<p dir="auto">This is to gather and close some other issues.  The NEP 50 proposal would close it.  In many cases using int64 as the default Python integer for scalar operations (where we disable value-based logic) can be surprising</p>
<ul dir="auto">
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="10533985" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/2955" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/2955/hovercard" href="https://github.com/numpy/numpy/issues/2955">gh-2955</a> (bitwise_and)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="66254462" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/5746" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/5746/hovercard" href="https://github.com/numpy/numpy/issues/5746">gh-5746</a> (comparison) although uint64 and int64 comparisons of course have still more issues (covered by <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="389178680" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/12525" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/12525/hovercard" href="https://github.com/numpy/numpy/issues/12525">gh-12525</a>)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="7731593" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/2524" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/2524/hovercard" href="https://github.com/numpy/numpy/issues/2524">gh-2524</a> (bit shift operators)</li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="216032133" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/8809" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/8809/hovercard" href="https://github.com/numpy/numpy/issues/8809">gh-8809</a> power is surprising for promotion (which is just the normal madness of scalar+value-based logic), again together with <a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="389178680" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/12525" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/12525/hovercard" href="https://github.com/numpy/numpy/issues/12525">gh-12525</a></li>
<li><a class="issue-link js-issue-link" data-error-text="Failed to load title" data-id="415655775" data-permission-text="Title is private" data-url="https://github.com/numpy/numpy/issues/13057" data-hovercard-type="issue" data-hovercard-url="/numpy/numpy/issues/13057/hovercard" href="https://github.com/numpy/numpy/issues/13057">gh-13057</a> (division of uint by Python int)</li>
</ul>
<p dir="auto">This issue is just to gather and close the other ones as duplicates.</p>