In test_series_expansion_URatP.cpp, why are the last two test cases "Expansion of sin” and “Expansion of log” expected to throw runtime errors? Seems to work fine for UnivariateSeries. Although currently something like -sin(1)*sin(2) + cos(1)*cos(2) is not simplified to cos(3).

@chenchfort, because expansion of

`sin(1+x)`

cannot be stored in a polynomial with rational coefficients because the coefficients are not rational
@isuruf I don’t know why it doesn’t work for me then… I’ll continue with

`Infinit`

as of now and then look for the source of error when the code is complete
@isuruf I’m trying to generalise

Or should the result be

`Infinity`

so that it can be later extended for any `direction`

but the arithmetics is not working out… for example if I have `Infinity`

with direction `(1+i)/2`

added to another similar or different `Infinity`

, what will be the direction of the resulting infinity. One workaround I thought was to convert directions to Unit vectors and then add vectors i.e. direction of any `Infinity`

is a unit vector. `pynac`

as of now assumes only positive, negative and complex infinity in its calculations.Or should the result be

`NaN`

unless directions match?
@CodeMaxx, if the directions don't match, the result is the same as

`Infinity - Infinity`

It's indeterminate

What about

`oo^oo`

?
different directions

if the exponent term is not positive infinity, you should throw an error

I mean after it is implemented.

Throw an error that it is not implemented. It's not really useful

Not really …. just a singleton given back instead of an error…. I’m looking for any specific use in sympy’s code though…I’ll tell you if I find anything.

btw here’s something interesting in the docstrings

Two exceptions are

`0**0`

and`oo**0`

, which all produce`1`

(this is consistent with Python's

float).

No uses as such in sympy… any computations related to NaN will give NaN … so yes I believe this is not necessary in SymEngine.

I’m currently giving an error on this.

@isuruf I would like to know some views on

`Infinity`

being derived from `Number`