computing the degree of polynomails

70 views
Skip to first unread message

Rishabh Kumar

unread,
Feb 15, 2014, 5:58:07 AM2/15/14
to sy...@googlegroups.com
hello,

myself Rishabh , i am currently pursuing my M.Sc in applied mathematics from IIT roorkee. i have been following the discussions on mailing list for quite some time. I would like to contribute to the open source software and become a part of Gsoc 2014 as i found sympy module very interesting and effective.

To start with, I have cloned your git repository and have started inspecting the code. while using sympy i found that sympy is not able to compute the degree of polynomials and expressions such as (x+y+z)**10000 in real time and the process has to be terminated. I wish to suggest a new way to compute the degree of the polynomials using recurrences . Should I start preparing a pull request or submit a patch ?

hoping for an early response and your faithful guidance .....

-Rishabh kumar 

Sergey Kirpichev

unread,
Feb 15, 2014, 6:18:48 AM2/15/14
to sy...@googlegroups.com


On Saturday, February 15, 2014 2:58:07 PM UTC+4, Rishabh Kumar wrote:
while using sympy i found that sympy is not able to compute the degree of polynomials and expressions such as (x+y+z)**10000 in real time and the process has to be terminated. I wish to suggest a new way to compute the degree of the polynomials using recurrences . Should I start preparing a pull request or submit a patch ?

Yes, please try to do.  Please also search our bugtracker, as there is something about this problem (and several attempts to solve it, AFAIK).

Harsh Gupta

unread,
Feb 15, 2014, 6:53:28 AM2/15/14
to sy...@googlegroups.com
See, https://code.google.com/p/sympy/issues/detail?id=3223.
> --
> You received this message because you are subscribed to the Google Groups
> "sympy" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to sympy+un...@googlegroups.com.
> To post to this group, send email to sy...@googlegroups.com.
> Visit this group at http://groups.google.com/group/sympy.
> For more options, visit https://groups.google.com/groups/opt_out.



--
Harsh

Rishabh Kumar

unread,
Feb 15, 2014, 9:19:07 AM2/15/14
to sy...@googlegroups.com
there are 2 functions to compute the degree of the polynomials : degree() and total_degree(). 
when we use them:
----------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------

>>> poly(x**3+y**5+z).degree()              #wrong
3
>>> poly(x**3+y**5+z).total_degree()          #correct
5


>>>poly(y**6*x**3+y**5+z).degree()       #wrong
3
>>> poly(y**6*x**3+y**5+z).total_degree()      #correct
9

___________________________________________________________________________________________________________________________________________________________________

mentors please clarify their significance. I am finding it a bit ambiguous.

Aaron Meurer

unread,
Feb 15, 2014, 1:58:55 PM2/15/14
to sy...@googlegroups.com
There is also a bug for this somewhere too, I think. The reason is
that degree takes the degree in the first variable, which, since you
didn't specify the variables, is chosen automatically to be x.

Aaron Meurer

Rishabh Kumar

unread,
Feb 25, 2014, 3:25:42 AM2/25/14
to sy...@googlegroups.com


while working on the patch , i came across the works of Monagen , Pearce and van hoeji and their work with polynomials. i believe that would be better if we work on that . It may revamp the polys module.   
Reply all
Reply to author
Forward
0 new messages