#13211: Upgrade GAP to 4.5.6
-----------------------------------------------------------+----------------
       Reporter:  kini                                     |         Owner:  
tbd              
           Type:  enhancement                              |        Status:  
needs_work       
       Priority:  major                                    |     Milestone:  
sage-5.5         
      Component:  packages                                 |    Resolution:     
              
       Keywords:                                           |   Work issues:     
              
Report Upstream:  Completely fixed; Fix reported upstream  |     Reviewers:  
Dmitrii Pasechnik
        Authors:  Volker Braun                             |     Merged in:     
              
   Dependencies:  #13123                                   |      Stopgaps:     
              
-----------------------------------------------------------+----------------

Comment (by kcrisman):

 {{{
 sage -t  "devel/sage-main/sage/algebras/group_algebra_new.py"
          [81.4 s]
 sage -t  "devel/sage-main/sage/groups/matrix_gps/orthogonal.py"
          [31.4 s]
 sage -t  "devel/sage-main/sage/groups/matrix_gps/symplectic.py"
          [30.7 s]
 sage -t  "devel/sage-main/sage/groups/matrix_gps/unitary.py"
          [31.2 s]
 sage -t  "devel/sage-main/sage/misc/randstate.pyx"
          [109.4 s]
 }}}

 I just gutted that part of the code.
 {{{
 #!diff
 # HG changeset patch
 # User Karl-Dieter Crisman <[email protected]>
 # Date 1348512346 14400
 # Node ID aedbdc34982e44f81636a8006f7fc44086604f43
 # Parent  e1f48782037500988a1ea3f3b0764ead26b6232f
 Remove big-endian workaround

 diff --git a/sage/misc/randstate.pyx b/sage/misc/randstate.pyx
 --- a/sage/misc/randstate.pyx
 +++ b/sage/misc/randstate.pyx
 @@ -718,23 +718,6 @@
                   seed = ZZ.random_element(long(1)<<128)
                   classic_seed = seed

 -                 if sys.byteorder == 'big':
 -                     # GAP's random number generator initialization
 -                     # (in integer.c, in FuncInitRandomMT) takes its
 -                     # seed as a string, then converts this string into
 -                     # an array of 32-bit integers just by casting the
 -                     # pointer.  Thus, the result depends on the
 -                     # endianness of the machine.  As a workaround, we
 -                     # swap the bytes in the string ourselves, so that
 -                     # GAP always gets the same array of integers.
 -
 -                     seed = str(seed)
 -                     new_seed = ''
 -                     while len(seed) >= 4:
 -                         new_seed += seed[3::-1]
 -                         seed = seed[4:]
 -                     seed = '"' + new_seed + '"'
 -
                   mersenne_seed = seed

               prev_mersenne_seed = gap.Reset(gap.GlobalMersenneTwister,
 mersenne_seed)
 }}}
 I don't know why these never format quite right...

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