gnu-octave / symbolic

A Symbolic Package for Octave using SymPy
https://octave.sourceforge.io/symbolic/
GNU General Public License v3.0
151 stars 36 forks source link

Using symengine instead of SymPy #1242

Closed SylvainCorlay closed 1 year ago

SylvainCorlay commented 1 year ago

Did you consider using the C++ SymEngine library instead of SymPy (by the same authors).

This would make it possible to directly link with Symengine rather than requiring a Python runtime.

cbm755 commented 1 year ago

Its a good idea. I think I started this before SymEngine.

But does SymEngine have all the features we need? I've never looked carefully at it.

alexvong243f commented 1 year ago

------- Original Message ------- On Friday, October 21st, 2022 at 11:17 PM, Colin B. Macdonald - notifications at github.com @.***> wrote:

Its a good idea. I think I started this before SymEngine.

But does SymEngine have all the features we need? I've never looked carefully at it.

While their documentation is not as easy to understand as those for sympy yet, you may want to look their c++ api namespace reference https://symengine.org/symengine/namespaceSymEngine.html

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.

SylvainCorlay commented 1 year ago

Just for transparency towards you, however, I have to say that the plotly integration is quite incomplete, as it works mainly for the basic plots, and still has limitations even in the basic examples...

@certik may be able to give a complete answer to that!

certik commented 1 year ago

SymEngine has basic symbolic manipulation features, but does not yet have more advanced symbolic algorithms like limits, integration etc. The advantage is that it is very fast and pure C++, no Python dependency.

cbm755 commented 1 year ago

Wrong thread maybe? completeness of plotly interface is not relevant to Octave Symbolic pkg as far as I know.

But nonetheless, @certik 's answer is useful to me :-) We definitely want "limits, integration, etc" in Octave Symbolic so I suspect its not worth moving: as we'd be moving to a hybrid approach, with both C++ and SymPy. Maybe that's worth it in the future but I don't think so at the moment.

certik commented 1 year ago

However, if anyone is interested in helping out with SymEngine, I am definitely interested in eventually implementing all the advanced algorithms. If so, please contact me!