I believe the speed of c is worthwhile here. And I am not skilled in Cython.
On Mar 4, 12:12 am, Robert Bradshaw <rober...@math.washington.edu> wrote: > On Mar 3, 2010, at 10:50 AM, kstueve wrote: > > > I've been working more on TOS's Li based pi(x) approximation code. > > I've been trying to optimize it in c. It seems that I need someone > > more knowledgeable than myself in c to point out some simple mistake I > > am making that is preventing the code from giving the correct answer. > > I tried copying and pasting the li function below into a Sage cell and > > "Pythonizing" it, and I got the expected answer, but as is in a c > > file, with commands being piped in the command line, I get unexpected > > results in Sage. I believe that the c li function below is correct-I > > think I am just making some sort of simple error in moving data > > around. I have already asked one of my peers in my number theory > > class, and we are both stuck. > > If it works in Python is there any reason you're not just cythonizing > it? (That would also seem easier than trying to use the subprocess > module, and if you care about speed that could be a lot of overhead > you'll save as well.) > > - Robert -- To post to this group, send an email to sage-devel@googlegroups.com To unsubscribe from this group, send an email to sage-devel+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/sage-devel URL: http://www.sagemath.org