These are chat archives for symengine/symengine

23rd
Jun 2016
Srajan Garg
@srajangarg
Jun 23 2016 07:05
@isuruf how much simplification does expand do? Will it simplify say (x+1)*(x+2) + (x+3)*(x+4)?
In general, what is the rule to keep in mind, about how much simplification is done?
Isuru Fernando
@isuruf
Jun 23 2016 07:16
expand will simplify it
Simplification should be done if the resulting term is simpler than the original. Keep in mind 'simpler' is hard to define
Srajan Garg
@srajangarg
Jun 23 2016 10:05
@isuruf In general find_gen(x**(b/a) + 1) should return x**(1/a) or x**(b/a)? (a, b are integers)
SymPy does x**(1/a). I'll stick with that for now
Isuru Fernando
@isuruf
Jun 23 2016 10:06
Sounds good
Srajan Garg
@srajangarg
Jun 23 2016 11:16
In a negative rational
in canonical form, the negative sign will always belong to the numerator term, right?
Isuru Fernando
@isuruf
Jun 23 2016 11:17
yes
Srajan Garg
@srajangarg
Jun 23 2016 14:51
@isuruf I have implemented a initial version of the find_generator function (only for univariate int polys). It does better than SymPy in some aspects (for eg. it handles x**1/2 + x +1 as a univariate poly). I have written some tests here. Can you have a look and please suggest some more.
Srajan Garg
@srajangarg
Jun 23 2016 15:21
Any more cases you'd like to see?
Isuru Fernando
@isuruf
Jun 23 2016 15:22
Looks good to me
Srajan Garg
@srajangarg
Jun 23 2016 19:32
Can someone explain this result
In [11]: Poly((x+y)**2 + 1, x+y)
Out[11]: Poly(x**2 + 2*x*y + y**2 + 1, x + y, domain='ZZ[x,y]')