#4957: [with patch, needs work] inconsistent integer hashing
------------------------------+---------------------------------------------
Reporter: robertwb | Owner: craigcitro
Type: defect | Status: assigned
Priority: critical | Milestone: sage-3.3
Component: basic arithmetic | Resolution:
Keywords: |
------------------------------+---------------------------------------------
Changes (by mabshoff):
* summary: [with patch, positive review] inconsistent integer hashing =>
[with patch, needs work] inconsistent integer
hashing
Comment:
This is broken on 64 bit linux:
{{{
sage -t -long "devel/sage/sage/rings/integer.pyx"
**********************************************************************
File
"/scratch/mabshoff/sage-3.3.alpha2/devel/sage/sage/rings/integer.pyx",
line 2085:
sage: n = -920390823904823094890238490238484; n.__hash__()
Expected:
6874330978542788722
Got:
6917515397235318898
**********************************************************************
File
"/scratch/mabshoff/sage-3.3.alpha2/devel/sage/sage/rings/integer.pyx",
line 2101:
sage: hash(n)
Expected:
-9223372036854767616
Got:
8192
**********************************************************************
File
"/scratch/mabshoff/sage-3.3.alpha2/devel/sage/sage/rings/integer.pyx",
line 2104:
sage: hash(n) == hash(int(n))
Expected:
True
Got:
False
**********************************************************************
}}}
--
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/4957#comment:3>
Sage <http://sagemath.org/>
Sage - Open Source Mathematical Software: Building the Car Instead of
Reinventing the Wheel
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"sage-trac" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/sage-trac?hl=en
-~----------~----~----~----~------~----~------~--~---