ASKSAGE: Sage Q&A Forum - Latest question feedhttp://ask.sagemath.org/questions/Q&A Forum for SageenCopyright Sage, 2010. Some rights reserved under creative commons license.Sun, 22 Aug 2010 12:06:38 -0500using %cython in Cantor with sage backendhttp://ask.sagemath.org/question/7611/using-cython-in-cantor-with-sage-backend/To use the %cython magic function in the sage notebook you can do something like:
%cython
from math import sin
def f(x):
return sin(x**2)
def integral(double a, double b, int N):
cdef double dx = (b-a)/N
cdef int i
cdef double s = 0
for i in range(N):
s += f(a+dx*i)
return s * dx
But in cantor you can't since the sage mode in Cantor is not the same as the sage notebook.
How can i do something like that in Cantor without using an external editor or without using more commands?
ngativSun, 22 Aug 2010 12:06:38 -0500http://ask.sagemath.org/question/7611/