These are chat archives for symengine/symengine
@rwst, @certik, I'm working on a generic series expansion class using templates. It's almost done. Idea is that you only define a few operations for series like multiply polynomials with a max degree, get coef, etc. Other methods like series_sin would be defined using these basic operations.
I've subclassed it for piranha with pp_t as the container and works fine. (i.e. it can be replaced for series method right now). For a series expansion using Expression, all I need now is a ExprPolynomial with some basic functionality. (or Expression can be used as the container after adding an integrate method.)
series_reverse, this method is not used. Are you planning to use it in the future?
ldegreeis divisible by n, then this is possible right?
series_invfuncfor user convenience, no plans. 2. I haven't thought about this. Offhand it depends on the order term, i.e.
1/(x^5-x^6)gets ordered normally and f(1/x) the reverse, 3. no the coeff of the lowest degree term, depending on which ring the coeffs are in, i.e. for reals the coeff must have a real root, for rationals a rational root.
series_nthroot, for rationals, if there is a rational root, and if
ldegreeis divisible by
n, then this is possible. Current implementation requires a non-zero constant term.
sin(1+x**2)should we use the above way in audi, i.e.
sin/cos(1)are the basic reals that appear in the series. If there is a simpification that is significantly shorter then yes. However I'd rather that series code stays elementary and these simplification rewrites are done by a function called by the user.
tanhandle the constant term, but to use
sinof constant is not implemented (except in
rs_series) there is no precedent and no plan. So please go ahead.
SeriesData, then it acts like a number ---- any operation will get immediately converted to
SeriesDataand collected appropriately into just one
SeriesData. I think that is a good design. it looks like your
seriesbranch allows that. Before we merge it, we should have at least 2 implementations, e.g. Piranha and let's say our Basic expressions. I think you almost have it.
sin(x) + sin(x).series(x, 10)won't automatically evaluate
sin(x)on the left
serieswas outside of
Basicthen it is easy to do, but when it is a
Basicit requires more work as that scenario is not yet implemented and requires changes in core classes and methods
serieswe don't need it as a
Basicas it "absorbs" all the other types and converts them into
series. This is not the case in
removeO()would convert Series to Basic.