<html><head><meta http-equiv="Content-Type" content="text/html; charset=us-ascii"></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; line-break: after-white-space;" class=""><br class=""><div><br class=""><blockquote type="cite" class=""><div class="">On 22 Nov 2018, at 10:47, Marcus Denker <<a href="mailto:marcus.denker@inria.fr" class="">marcus.denker@inria.fr</a>> wrote:</div><br class="Apple-interchange-newline"><div class=""><div class=""><br class=""><br class=""><blockquote type="cite" class="">On 21 Nov 2018, at 19:45, Eliot Miranda <<a href="mailto:eliot.miranda@gmail.com" class="">eliot.miranda@gmail.com</a>> wrote:<br class=""><br class="">Hi All,<br class=""><br class="">    right now we have the following definition of Large(Positive)Integer>>hash:<br class=""><br class="">hash<br class=""><span class="Apple-tab-span" style="white-space:pre">  </span>^ByteArray hashBytes: self startingWith: self species hash<br class=""><br class="">which means that for all integers outside of the 32-bit SmallInteger range (-2 ^ 30 to 2 ^ 30 - 1), the 32-bit system and the 64-bit system answer different values for hash.<br class=""><br class="">e.g. in 64 bits: (2 raisedTo: 30) hash 1073741824<br class=""> but in 32 bits: (2 raisedTo: 30) hash 230045764<br class=""><br class="">This is unsatisfactory.  I propose changing Large(Positive)Integer>>hash to<br class=""><br class="">hash<br class=""><span class="Apple-tab-span" style="white-space:pre">        </span>^self digitLength <= 8<br class=""><span class="Apple-tab-span" style="white-space:pre">      </span><span class="Apple-tab-span" style="white-space:pre">    </span>ifTrue: [self]<br class=""><span class="Apple-tab-span" style="white-space:pre"> </span><span class="Apple-tab-span" style="white-space:pre">    </span>ifFalse: [ByteArray hashBytes: self startingWith: self species hash]<br class=""><br class=""><br class=""></blockquote><br class="">Thanks, I added an issue tracker entry:<br class=""><span class="Apple-tab-span" style="white-space:pre">     </span><br class=""><span class="Apple-tab-span" style="white-space:pre">       </span><a href="https://pharo.fogbugz.com/f/cases/22690/32-vs-64-bits-and-large-integer-hash" class="">https://pharo.fogbugz.com/f/cases/22690/32-vs-64-bits-and-large-integer-hash</a><br class=""><br class="">I will do a pull request later (if not someone else is faster to do it).<br class=""></div></div></blockquote><div><br class=""></div><div><a href="https://github.com/pharo-project/pharo/pull/2009" class="">https://github.com/pharo-project/pharo/pull/2009</a></div><div><br class=""></div><blockquote type="cite" class=""><div class=""><div class=""><br class="">--<br class="">Marcus Denker  --  <a href="mailto:marcus@2denker.de" class="">marcus@2denker.de</a><br class=""><a href="http://www.zweidenker.de" class="">http://www.zweidenker.de</a><br class=""></div></div></blockquote></div><br class=""></body></html>