These are chat archives for symengine/symengine

26th
Oct 2015
Ralf Stephan
@rwst
Oct 26 2015 08:01
The fact that Cython delegates A.__gt__(B) to an internal function that calls A.__richcmp__(B)and then ignores return values other than True/False is a disaster for symengine trying to behave like SymPy because symengine cannot return a relation with e.g. x>y. And we don't want symengine.py a pure Python file, this would be too slow?
Ralf Stephan
@rwst
Oct 26 2015 08:12
Correction: most return values are not ignored, just NotImplemented is. #-|
Abinash Meher
@abinashmeher999
Oct 26 2015 13:01
@isuruf Sorry I missed your message on 16th. Can you share the email that you use for Rubygems?
Isuru Fernando
@isuruf
Oct 26 2015 14:17
Ralf Stephan
@rwst
Oct 26 2015 15:00
why would repr(ex) give False on Appveyor but give the correct string on Travis? I'm still a Python noob...
I meant not False but 'False'
Ralf Stephan
@rwst
Oct 26 2015 15:49
I can't reproduce with the test system what I'm getting with isympy. Where to go further?
Isuru Fernando
@isuruf
Oct 26 2015 16:14
You can login into the appveyor server and debug it.
Maybe we are installing an old version of sympy
Ralf Stephan
@rwst
Oct 26 2015 16:17
@isuruf, also all Travis runs but one failed. But thanks, I didn't know this was possible.
Isuru Fernando
@isuruf
Oct 26 2015 16:19
What's also weird is that the status of Travis in Github is passing, although it is failing
Isuru Fernando
@isuruf
Oct 26 2015 16:25
Found the error. Returning x + 1 < x instead of False is in the dev version of SymPy. Only things like x+y < x are not evaluated automatically
Ralf Stephan
@rwst
Oct 26 2015 16:26
ah
so who upgrades that? I don't know any Windoze..
I could simply change test_rel() to work arond it.
*around
Isuru Fernando
@isuruf
Oct 26 2015 16:29
We install latest SymPy release on appveyor and travis. So, I think a test like x+y<x is better here.
Ralf Stephan
@rwst
Oct 26 2015 16:30
Will do.
That was instructive.
Ondřej Čertík
@certik
Oct 26 2015 18:27
@rwst thanks a lot for your work! To answer your question --- we can already use Flint (since we use Arb). I also wanted to use Piranha, and I think Piranha is faster, so I wanted to use it instead of Flint for polynomials. I wanted to have an implementation in SymEngine itself only if it can be as fast as Piranha, so @Sumith1896 spent some time investigating how to do that. @rwst for the Sage application, which library do you think is best for polynomial manipulation?
Ralf Stephan
@rwst
Oct 26 2015 19:30
@certik , Flint is the fastest and most capable univariate library in Sage, and reportedly nothing can beat libSingular in multivariate capabilities. Speed is not so important with multivar as long as it's still difficult to have even a bugfree implementation, e.g. the multivar gcd in Pynac is buggy. LibSingular has reliable gcd and Gröbner bases. And you absolutely need both.
I might look at symengine series next, is someone working on that?
Ondřej Čertík
@certik
Oct 26 2015 21:28
@rwst, the series expansion is on my todo list. Ginac just uses it's own internal implementation, but I just wanted to base it on top of some kind of polynomial library.
@bluescarni I don't think Piranha can do multivariate gcd or Groebner bases, can it?
@rwst so we spent the summer figuring out a fast way to represent a series expansion in sympy, this was our result: https://github.com/sympy/sympy/blob/master/sympy/polys/ring_series.py, thanks to @shivamvats. Essentially it is based on a sparse multivariate representation.
Ondřej Čertík
@certik
Oct 26 2015 21:34
If you have thoughts about what the best way is to implement or design series expansion, let me know. Do you think our idea of basing it on top of sparse polynomials (with generalized rational exponents) is the way to go?
Let's assume so for now --- then the next question is how to implement the polynomials. You don't need gcd or Groebner bases, but you need very fast multiplication, addition and other manipulation. In my experience, Piranha is the fastest of all libraries I tried. Flint/Nemo is slower, except perhaps one benchmark. Singular is a lot slower. So that was my reasoning to start with Piranha and base the series expansion on top of that. That should make it really fast. It should be a lot faster than GiNaC, but we'll see.