#9590: Doctest failures in cone.py and toric_lattice_element.pyx on 32-bit Linux
----------------------------------+-----------------------------------------
   Reporter:  mpatel              |       Owner:  mhampton    
       Type:  defect              |      Status:  needs_review
   Priority:  blocker             |   Milestone:  sage-4.5.2  
  Component:  geometry            |    Keywords:              
     Author:  Andrey Novoseltsev  |    Upstream:  N/A         
   Reviewer:                      |      Merged:              
Work_issues:                      |  
----------------------------------+-----------------------------------------

Comment(by leif):

 If anyone wants this to be fixed in a different way, here are two
 alternatives in a single patch:
 {{{
 #!patch
 diff --git a/sage/geometry/cone.py b/sage/geometry/cone.py
 --- a/sage/geometry/cone.py
 +++ b/sage/geometry/cone.py
 @@ -557,8 +557,12 @@
          TESTS::

              sage: c = Cone([(1,0), (0,1)])
 -            sage: hash(c)  # 64-bit
 -            4372618627376133801
 +            sage: hash(c)
 +            1996666537 # 32-bit
 +            4372618627376133801 # 64-bit
 +            sage: c2 = Cone([(1,0), (0,1)])
 +            sage: hash(c) == hash(c2)
 +            True
          """
          if "_hash" not in self.__dict__:
              self._hash = hash(self._rays)
 diff --git a/sage/geometry/toric_lattice_element.pyx
 b/sage/geometry/toric_lattice_element.pyx
 --- a/sage/geometry/toric_lattice_element.pyx
 +++ b/sage/geometry/toric_lattice_element.pyx
 @@ -233,8 +233,13 @@
              ...
              TypeError: mutable vectors are unhashable
              sage: n.set_immutable()
 -            sage: hash(n)  # 64-bit
 -            2528502973977326415
 +            sage: hash(n)
 +            -378539185 # 32-bit
 +            2528502973977326415 # 64-bit
 +            sage: n2 = N(1,2,3)
 +            sage: n2.set_immutable()
 +            sage: hash(n) == hash(n2)
 +            True
          """
          return Vector_integer_dense.__hash__(self)
 }}}
 (This is against vanilla alpha0.)

 Otherwise (Seattle, wake up!) I'll set this to "positive review" (as is),
 s.t. it can be merged into alpha1.

-- 
Ticket URL: <http://trac.sagemath.org/sage_trac/ticket/9590#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