#11986: inconsistent integer hashing on 64bit systems with python 2.7
-----------------------+----------------------------------------------------
   Reporter:  fbissey  |          Owner:  jdemeyer      
       Type:  defect   |         Status:  needs_review  
   Priority:  major    |      Milestone:  sage-4.8      
  Component:  c_lib    |       Keywords:                
Work_issues:           |       Upstream:  N/A           
   Reviewer:           |         Author:  Jeroen Demeyer
     Merged:           |   Dependencies:  #9958         
-----------------------+----------------------------------------------------

Comment(by fbissey):

 I tried this on one of my amd64 machine with a vanilla sage-4.8.alpha3
 (using python-2.6) and got this back:
 {{{
 sage -t -long -force_lib "devel/sage-main/sage/rings/integer.pyx"
 **********************************************************************
 File "/home/work/fbissey/sandbox/sage-4.8.alpha3/devel/sage-
 main/sage/rings/integer.pyx", line 3075:
     sage: hash(n) == hash(long(n))
 Expected:
     True
 Got:
     False
 **********************************************************************
 File "/home/work/fbissey/sandbox/sage-4.8.alpha3/devel/sage-
 main/sage/rings/integer.pyx", line 3077:
     sage: hash(n-1) == hash(long(n-1))
 Expected:
     True
 Got:
     False
 **********************************************************************
 File "/home/work/fbissey/sandbox/sage-4.8.alpha3/devel/sage-
 main/sage/rings/integer.pyx", line 3079:
     sage: hash(-n) == hash(long(-n))
 Expected:
     True
 Got:
     False
 **********************************************************************
 File "/home/work/fbissey/sandbox/sage-4.8.alpha3/devel/sage-
 main/sage/rings/integer.pyx", line 3081:
     sage: hash(1-n) == hash(long(1-n))
 Expected:
     True
 Got:
     False
 **********************************************************************
 1 items had failures:
    4 of  25 in __main__.example_63
 ***Test Failed*** 4 failures.
 }}}
 Everything is working as intended with python-2.7 on that machine.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/11986#comment:6>
Sage <http://www.sagemath.org>
Sage: Creating a Viable Open Source Alternative to Magma, Maple, Mathematica, 
and MATLAB

-- 
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.

Reply via email to