# HG changeset patch
# User Jeroen Demeyer <jdemeyer@cage.ugent.be>
# Date 1348600581 7200
# Node ID d895d1e2210e0e53d9bbcfb10b7aacf9ebed76b7
# Parent 011160197a50e08948ab8d48a3f62bb4dee10d51
No longer mark Cython tests as "optional  gcc"
diff git a/sage/misc/cython.py b/sage/misc/cython.py
a

b


590  590  Create a compiled function which evaluates ``expr`` assuming machine values 
591  591  for ``vars``. 
592  592  
593   .. warning:: 
594   
595   This implementation is not well tested. 
596   
597  593  INPUT: 
598  594  
599  595   ``vars``  list of pairs (variable name, cdata type), where the variable 
… 
… 

604  600  objects defined in the current module scope ``globals()`` using 
605  601  ``sage.object_name``. 
606  602  
 603  .. warning:: 
 604  
 605  Accessing ``globals()`` doesn't actually work, see :trac:`12446`. 
 606  
607  607  EXAMPLES: 
608  608  
609  609  We create a Lambda function in pure Python (using the r to make sure the 3.2 
… 
… 

613  613  
614  614  We make the same Lambda function, but in a compiled form. :: 
615  615  
616   sage: g = cython_lambda('double x, double y', 'x*x + y*y + x + y + 17*x + 3.2') # optional  gcc 
617   sage: g(2,3) # optional  gcc 
618   55.200000000000003 
619   sage: g(0,0) # optional  gcc 
620   3.2000000000000002 
 616  sage: g = cython_lambda('double x, double y', 'x*x + y*y + x + y + 17*x + 3.2') 
 617  sage: g(2,3) 
 618  55.2 
 619  sage: g(0,0) 
 620  3.2 
621  621  
622   We access a global function and variable. :: 
 622  The following should work but doesn't, see :trac:`12446`:: 
623  623  
624  624  sage: a = 25 
625   sage: f = cython_lambda('double x', 'sage.math.sin(x) + sage.a') # optional  gcc 
626   sage: f(10) # optional  gcc 
 625  sage: f = cython_lambda('double x', 'sage.math.sin(x) + sage.a') 
 626  sage: f(10) # known bug 
627  627  24.455978889110629 
628  628  sage: a = 50 
629   sage: f(10) # optional  gcc 
 629  sage: f(10) # known bug 
630  630  49.455978889110632 
631  631  """ 
632  632  if isinstance(vars, str): 
… 
… 

664  664  
665  665  INPUT: 
666  666  
667    ``filename``  string: a Cython (formerly SageX) (.spyx) file 
 667   ``filename``  string: a Cython (.spyx) file 
668  668  
669  669  OUTPUT: None 
670  670  
… 
… 

689  689  sage: s = "def hello():\n print 'hello'\n" 
690  690  sage: f.write(s) 
691  691  sage: f.close() 
692   sage: cython_create_local_so('hello.spyx') # optional  gcc 
 692  sage: cython_create_local_so('hello.spyx') 
693  693  Compiling hello.spyx... 
694   sage: sys.path.append('.') # optional  gcc 
695   sage: import hello # optional  gcc 
696   sage: hello.hello() # optional  gcc 
 694  sage: sys.path.append('.') 
 695  sage: import hello 
 696  sage: hello.hello() 
697  697  hello 
698  698  sage: os.chdir(curdir) 
699  699  
diff git a/sage/misc/session.pyx b/sage/misc/session.pyx
a

b


266  266  
267  267  Something similar happens for cythondefined functions.:: 
268  268  
269   sage: g = cython_lambda('double x', 'x*x + 1.5') # optional  gcc 
270   sage: save_session('tmp_f', verbose=True) # optional  gcc 
271   ... 
 269  sage: g = cython_lambda('double x', 'x*x + 1.5') 
 270  sage: save_session('tmp_f', verbose=True) 
 271  Saving... 
272  272  Not saving g: g is a function, method, class or type 
273  273  ... 
274  274  """ 
diff git a/sage/rings/polynomial/polynomial_compiled.pyx b/sage/rings/polynomial/polynomial_compiled.pyx
a

b


31  31  [ ] Recursive calling 
32  32  [ ] Faster casting of coefficients / argument 
33  33  [ ] Multivariate polynomials 
34   [ ] SageX implementation of Pippenger's Algorithm that doesn't 
 34  [ ] Cython implementation of Pippenger's Algorithm that doesn't 
35  35  depend heavily upon dicts. 
36  36  [ ] Computation of parameter sequence suggested by Pippenger 
37  37  [ ] Univariate exponentiation can use Brauer's method to improve 
diff git a/sage/structure/element.pyx b/sage/structure/element.pyx
a

b


923  923  return left._rich_to_bool(op, left._cmp_c_impl(right)) 
924  924  
925  925  cdef int _cmp_c_impl(left, Element right) except 2: 
926   ### For derived SageX code, you *MUST* ALSO COPY the __richcmp__ above 
 926  ### For derived Cython code, you *MUST* ALSO COPY the __richcmp__ above 
927  927  ### into your class!!! For Python code just use __cmp__. 
928  928  raise NotImplementedError, "BUG: sort algorithm for elements of '%s' not implemented"%right.parent() 
929  929  