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

Comment(by drkirkby):

 Replying to [comment:48 vbraun]:
 > * Of course it does not produce good random numbers, duh!

 So if it produces poor random numbers and is not portable, is is a good
 choice? I would suggest not. A more trivial bit of code I showed earlier:

 {{{
 static unsigned long next = 1;
 int myrand(void)  /* RAND_MAX assumed to be 32767. */
 {
     next = next * 1103515245 + 12345;
     return((unsigned)(next/65536) % 32768);
 }


 void mysrand(unsigned seed)
 {
     next = seed;
 }
 }}}

 would be more portable. Again the random numbers would not be good, but it
 would be simpler and more portable. Would that not be a better choice?

 > * its basically impossible to write portable code without C99. Pick any
 Sage component and I'll bet you there is a 16-bit machine out there that
 will break that code :-)

 16-bit machines are pretty old, and not worth worrying about.

 But Even the latest FreeBSD is not fully C99 compliant.

 In fact, not even gcc is fully compliant to the C99 standard, as 11 years
 after the standard was ratified, gcc still does not fully support it. See
 the latest status at

 http://gcc.gnu.org/c99status.html

 Of course, the gcc developers have been busy in that time adding
 extensions to gcc, so gcc is able to compile a superset and subset of the
 C standard.

 Hence I'd personally try to avoid an unnecessary dependence of C99.
 Clearly this could be written to not need C99.

 Needless to say !SunStudio is fully C99 compliant.

 > * the "portable_" prefix is just to distinguish it from the libc
 functions.

 Perhaps {{{semi_portable}}} might have been better !!

 Anyway, all jokes aside, it does produce the same sequence of numbers on
 the platforms I was able to build it on.

 Dave

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