#9798: Accelerate Polyhedron constructor and fix cddlib output ordering
----------------------------+-----------------------------------------------
   Reporter:  vbraun        |       Owner:  mhampton    
       Type:  defect        |      Status:  needs_review
   Priority:  major         |   Milestone:  sage-4.6    
  Component:  geometry      |    Keywords:              
     Author:  Volker Braun  |    Upstream:  N/A         
   Reviewer:                |      Merged:              
Work_issues:                |  
----------------------------+-----------------------------------------------

Comment(by dimpase):

 Replying to [comment:53 vbraun]:
 > OK, I installed `OpenSolaris` 2009.06 in a virtual machine and debugged
 the problem. The issue is that Solaris sets `RAND_MAX=32767` and cddlib
 does essentially this (pseudocode)
 > {{{
 >   r = (double)rand()
 >   k = int(sizeof(my_array) * r / RAND_MAX)
 >   random_element = my_array[k]
 > }}}
 > which overflows after replacing rand with the glibc rand (which has
 RAND_MAX=2147483647).
 >
 > I've fixed the issue by unconditionally overriding `RAND_MAX` in the new
 `random.h` instead of checking if it is already #defined.
 >
 > Updated spkg is at http://www.stp.dias.ie/~vbraun/Sage/spkg/cddlib-
 094f.p8.spkg
 >
 > I tested it on Fedora 13, `OpenSolaris` 2009.06 i386, and OSX 10.6.4.
 The testsuite passes on all three.

 I just tested in on a Debian testing x64; let me test on a MacOSX PPC,
 just to have one non-x86 in the picture.

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