On 2010-03-17, at 21:28, Ondrej Certik wrote:

Hi,

we just fixed the last bugs in the Mateusz's polys branch and pushed
it in our main git repo. All tests pass for all kinds of
configurations that I tried, but if possible, please test it (I didn't
test on Mac nor Windows).

Just to get some idea, Mateusz did about 150 patches and it implements
all kinds of polynomial algorithms, see e.g. this patch for some
details:

http://git.sympy.org/?p=sympy.git;a=commit;h=31c9aa43ffc7bc031493fc4ea27b74dc50c4d035

It should fix all kinds of bugs and also it's quite fast and robust.
E.g. this failed:

In [1]: f = expand((x+y+z)**20)

In [2]: factor(f)
Out[2]:
          20
(x + y + z)

and now it works.

Plus the core polynomials are cythonized in pure Cython mode (so far
only about 2x speedup), but I think we'll figure out ways to speed it
up more using Cython.

Ondrej


I was excited to see the first cython bits in the main repo, but I am having a few problems.

I'm on a ppc mac running 10.5.8 and using the system python 2.5.1 and the latest head of cython (12507ec6fa91) from http://hg.cython.org/cython-devel .

First, it looks like lambda is not supported by this version of cython (error below). Are you using the cython-closure branch?

Second, it looks like the cythonized decorator is not having the desired effect. I'm guessing this is because the cython.locals decorator has to actually be seen by cython (the decorator itself doesn't do anything). Could this be done using a pxd file?

Ted

boo-2:sympy-git2 ted$ make
python build.py build_ext --inplace
Compiling module sympy.polys.densearith ...
Compiling module sympy.polys.densebasic ...
Compiling module sympy.polys.densetools ...

Error converting Pyrex file to C:
------------------------------------------------------------
...
raise ValueError("can't refine a real root on (%s, %s)" % (s, t))

    fast = args.get('fast')

    if type(n) is not int:
        cond = lambda a, b, c, d, i, F: abs(F(a, c) - F(b, d)) < n
              ^
------------------------------------------------------------

/Users/ted/Developer/OpenSource/SymPy/sympy-git2/sympy/polys/ densetools.py:2176:15: Expected an identifier or literal
Traceback (most recent call last):
  File "build.py", line 31, in <module>
    raise RuntimeError("failed to compile %s" % module)
RuntimeError: failed to compile sympy.polys.densetools
make: *** [all] Error 1

--
You received this message because you are subscribed to the Google Groups 
"sympy" 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/sympy?hl=en.

Reply via email to