Comment #8 on issue 1598 by mattpap: New polynomials manipulation module
http://code.google.com/p/sympy/issues/detail?id=1598

I forgot to mention that you can easily switch between different ground  
types, just
specify SYMPY_GROUND_TYPES=something before isympy. So lets factor once  
again, this
time using gmpy's mpz and mpq types for ZZ and QQ algebras respectively:

$ SYMPY_GROUND_TYPES=gmpy isympy
Python 2.6.2 console for SymPy 0.7.0-git (cache: off)

In [1]: a = (x+y+sin(z))**20

In [2]: b = a.expand()

In [3]: %time c = factor(b, expand=False)
CPU times: user 0.87 s, sys: 0.00 s, total: 0.87 s
Wall time: 0.95 s

and lets compare with standard Python's types:

$ SYMPY_GROUND_TYPES=python isympy
Python 2.6.2 console for SymPy 0.7.0-git (cache: off)

In [1]: a = (x+y+sin(z))**20

In [2]: b = a.expand()

In [3]: %time c = factor(b, expand=False)
CPU times: user 5.25 s, sys: 0.01 s, total: 5.26 s
Wall time: 5.37 s

If Fraction is not available SymPy can run in a mixed mode, i.e. you can  
work with
int as ZZ and mpq as QQ. Note, however, this mode is not yet tested well.

btw. I thought, Ondrej, that the conference is this weekend but it starts  
next
Thursday so I can surely experiment with Cython and try to use it in  
polynomials
module before then.

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

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

Reply via email to