Isuru Fernando

Results 928 comments of Isuru Fernando

See https://github.com/symengine/symengine.py/pull/403 for a hacky workaround.

1. Easiest option here is to define `ITE` as a python function that returns a piecewise. Other option is to implement in C++ 2. `sym.Lambdify` works instead of `sym.lambdify` there....

> expr = (0 < a) & (a < 1) `&` is a bitwise operator and `and` is the logical operator. However, there's no way to override `and` in python....

There is code to convert to a polynomial object (UExprPoly) and convert it back. I would suggest adding an integrate function there.

Btw, if all you need are polynomials, symengine is not the fastest package for you. (Either in C++ or in Julia)

You can write one in Julia. 1. Expand the expression 2. If the expression is a Pow, check that the first argument `ex`. 3. If the expression is an Add,...

```julia julia> using SymEngine julia> a,b,t = SymEngine.symbols("a b t") (a, b, t) julia> SymEngine.get_symengine_class(t+3*a) :Add julia> SymEngine.get_symengine_class(t+3*a+b^2) :Add julia> SymEngine.get_symengine_class(3*a) :Mul julia> SymEngine.get_symengine_class(b^2) :Pow ```

`get_name` is for a `FunctionSymbol` instance like `f(x)` to return `"f"`. `function_symbols` create `FunctionSymbol` instances. Neither of these two functions matter for your use-case.

`subs` looks at terms and does not use a solver inside. You'll have to do the following, ```julia @vars z subs(z^3+z^2+z,z,cbrt(Basic(3))) ```