What does HackerNews think of symengine?

SymEngine is a fast symbolic manipulation library, written in C++

Language: C++

#19 in C++
If you need programmability or interoperability, Sympy is way nicer. If you just want an interactive symbolic calculator, Maxima is fine but sometimes quirky (has odd conventions due mainly to its age). As heisig points out, Maxima can be quite a bit faster (but I run into slow things with it too). Using Maxima via Sage is in some ways the best of both worlds.

You may also be interested in SymEngine: https://github.com/symengine/symengine

As one point of comparison, SymPy is comically slow compared to Sage. This is mostly because SymPy is purely Python; Sage on the other hand uses its own derivative of GiNaC [1], Pynac [2], for its internal symbolic expression representation, and then multiple external libraries for non-trivial operations. Symbolic transformations are mostly Maxima [3], for example. Sage literally converts expressions to strings, pipes them through a Maxima process, and then parses the result back. This is still much faster than the pure Python SymPy.

There is an effort to speed up SymPy core, SymEngine [4], but it's been in development for years now, and still isn't integrated into SymPy. Not sure why.

Case in point: 'expand("(2 + 3 * x + 4 * x * y)^60")' takes 5 seconds with SymPy; Sage (Pynac) does the same in 0.02 seconds.

[1] https://www.ginac.de/

[2] http://pynac.org/

[3] http://maxima.sourceforge.net/

[4] https://github.com/symengine/symengine

SymEngine https://github.com/symengine/symengine

> SymEngine is a standalone fast C++ symbolic manipulation library. Optional thin wrappers allow usage of the library from other languages, e.g.:

> [...] Python wrappers allow easy usage from Python and integration with SymPy and Sage (the symengine.py repository)

https://en.wikipedia.org/wiki/SymPy > Related Projects:

> SymEngine: a rewriting of SymPy's core in C++, in order to increase its performance. Work is currently in progress to make SymEngine the underlying engine of Sage too

To add more info they have been building a C++ code-base for the most important features: https://github.com/symengine/symengine SymEngine can be used from C++ or from the wrappers in Python, Julia, Haskell - and gives a performance boost over vanilla SymPy.
There are several functions in base R for differentiation, integration, solving system of equations, etc. E.g. `solve`, `stats::D`, `stats::deriv`, `stats::integrate`, `stats::numericDeriv`.

R package Deriv for symbolic differentiation, it allows user to supply custom rules for differentiation.[1]

R package numDeriv[2] for calculating numerical approximations to derivatives.

R package gmp[3] and Rmpfr[4] provide multiple precision arithmetic and floating point operations. They also include some special functions, e.g. Rmpfr::integrateR for numerical integration.

R package mpc[5] available at R forge. It provides multiple precision arithmetic for complex numbers.

R package rSymPy[6] provides an interface to ‘SymPy’ library in python via rJava.

R package Ryacas[7] provides an interface to the ‘Yacas’ computer algebra system. It is easier to install compared to `rSymPy`.

R package symengine[8] is an R interface to the SymEngine C++ library for symbolic computation.

[1] https://cran.r-project.org/web/packages/Deriv/index.html

[2] https://cran.r-project.org/web/packages/numDeriv/index.html

[3] https://cran.r-project.org/web/packages/gmp/index.html

[4] https://cran.r-project.org/web/packages/Rmpfr/index.html

[5] http://mpc.r-forge.r-project.org/

[6] https://cran.r-project.org/web/packages/rSymPy/index.html

[7] https://cran.r-project.org/web/packages/Ryacas/index.html

[8] https://github.com/symengine/symengine.R