These are chat archives for symengine/symengine

12th
Apr 2016
Charles Chen
@chenchfort
Apr 12 2016 07:04
What does step_list() in series.h do?
Charles Chen
@chenchfort
Apr 12 2016 11:19
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).
Isuru Fernando
@isuruf
Apr 12 2016 11:41
@chenchfort, because expansion of `sin(1+x)` cannot be stored in a polynomial with rational coefficients because the coefficients are not rational
Charles Chen
@chenchfort
Apr 12 2016 11:41
Alright. @isuruf Please review #868
Akash Trehan
@CodeMaxx
Apr 12 2016 16:11
@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
Akash Trehan
@CodeMaxx
Apr 12 2016 16:20
@isuruf I’m trying to generalise `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?
Isuru Fernando
@isuruf
Apr 12 2016 16:23
@CodeMaxx, if the directions don't match, the result is the same as `Infinity - Infinity`
It's indeterminate
Akash Trehan
@CodeMaxx
Apr 12 2016 16:23
right… was thinking of doing the same.
What about `oo^oo` ?
different directions
Isuru Fernando
@isuruf
Apr 12 2016 16:26
if the exponent term is not positive infinity, you should throw an error
Akash Trehan
@CodeMaxx
Apr 12 2016 16:27
error or `NaN` ?
I mean after it is implemented.
Isuru Fernando
@isuruf
Apr 12 2016 16:30
Throw an error that it is not implemented. It's not really useful
Akash Trehan
@CodeMaxx
Apr 12 2016 16:31
Right. So we don’t need `NaN` in symengine?
Isuru Fernando
@isuruf
Apr 12 2016 16:32
There's nothing useful about `NaN` right?
Akash Trehan
@CodeMaxx
Apr 12 2016 16:39
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.
Akash Trehan
@CodeMaxx
Apr 12 2016 16:45
What do we do about `oo^0` though?
I’m currently giving an error on this.
Isuru Fernando
@isuruf
Apr 12 2016 16:45
That's fine
Akash Trehan
@CodeMaxx
Apr 12 2016 17:36
@isuruf I would like to know some views on `Infinity` being derived from `Number`