@certik, I will make sure `__dealloc__`

works before making the changes.

Sage has some kind of a directional infinity, but no ComplexInfinity.

```
sage: (3+4*I)*oo
(4/5*I + 3/5)*Infinity
```

Sympy doesn't have it, but has a ComplexInfinity

```
In [19]: (3+4*I)*oo
Out[19]: oo + oo*I
```

What should SymEngine implement?

Why is the method

`is_canonical()`

a member function of classes?
Say if I wrote the

`is_canonical()`

for `Polynomial`

, how do I test it?
As of now, the Polynomial doesn't require any special checks for

`is_canonical()`

but I am adding it so that we can modify it later, as and when needed.
Given a

`mpz_class`

number and a `Symbol`

, how do I generate the `Mul`

of them?
`mul(integer(a), b)`

where a is the `mpz_class`

and b is the `Symbol`

is the easiest way
But we have to use

Will

`rcp(new Mul`

instead of `mul`

, right?Will

`rcp(new Mul(integer(a), b))`

do?
No.

`mul(integer(a), b)`

is a slower but convenient way for users, but for speed you should use,`Mul::from_dict(integer(a), {{b, one}})`

If it's

`a*b**c`

, then `Mul::from_dict(integer(a), {{b, integer(c)}})`

would do right?
Pow doesn't have

`from_dict`

, so does `Pow::Pow(b, integer(c)`

work for `Symbol`

b and `mpz_class`

c to generate `b**c`

or should I use

`pow(b, integer(c))`

?
Compiler is complaining as we cannot call constructor directly, so I am using the latter now.

Thanks @isuruf for the help.

@isuruf You know, I always thought things like

`(4/5*I + 3/5)*Infinity`

or `oo + oo*I`

are funky. I would just do Infinity (positive infinite quantity) and ComplexInfinity (infinite magnitude, undetermined complex phase), just like Mathematica (https://reference.wolfram.com/language/ref/Infinity.html, https://reference.wolfram.com/language/ref/ComplexInfinity.html). So both `(4/5*I + 3/5)*Infinity`

and `oo + oo*I`

become ComplexInfinity.
Well, WolframAlpha multiplies by 1/5 out of the blue: http://www.wolframalpha.com/input/?i=%283%2B4*I%29*oo

So it looks like Mathematica doesn't really simplify either. So I wouldn't worry about this too much right now.

@shivamvats yes, I think the rings can be extended for negative exponents

The result in WolframAlpha is because

`(4/5*I+3/5)`

is the unit vector in the direction of `(4*I+3)`

@Sumith1896 The idea is that if you know your expression is already canonical, just construct the class directly (

`from_dict`

, or `Pow(a, b)`

). As long as there are thorough tests (which are run in Debug mode), any problems will be caught by the is_canonical test in the constructor. If you do not know that your expression is canonical, then you need to use `mul`

or `pow`

, which will make it canonical (and thus they are slower).
@isuruf I see, good point.

I never found the arithmetic with infinities useful, so anything that is consistent I think is ok.

sympy/symengine#454 PR doesn't seem to have Travis build going on now?

Notice from travis:

Linux build processing stalled for .org jobs for a brief period of time. Your builds may experience longer delay before starting.

Linux build processing stalled for .org jobs for a brief period of time. Your builds may experience longer delay before starting.

@certik I've ported all the functions with Taylor expansions. Should I send create separate PRs for Taylor expansions and for Laurent series functions? The Taylor series PR can be merged early, then.

@shivamvats split it into PRs as you see fit. It's better to split big work into small PRs, so that we can merge them independently, if possible. Also it's much easier to review smaller PRs than one big one. But sometimes it's not possible to split it, so just use your best judgement.

@certik If I take in parameter as

If yes, then how do I change it?

`const Polynomial &a`

, is `a`

mutable?If yes, then how do I change it?

My basic concern is this:

I take in

I take in

`const Polynomial &a`

, in the function I want to convert `a`

to `-a`

using `neg_poly()`

how do I go about?