Doubt regarding as_leading_term for multivairate case

17 views
Skip to first unread message

Anderson Bhat

unread,
Nov 9, 2021, 6:30:36 AM11/9/21
to sympy
Hey guys ! 

I am working on a Pr based on the as_leading_term() method of core/expr.py (specifically on multivariable cases) . I would be glad if someone could clarify whether 
(1/x + y).as_leading_term(x) and (1/x + y).as_leading_term(y), both should give back 1/x as the output !!

I am not that sure of multivariate cases for as_leading_term() because I can't couldn't any tests for the same in core/expr.py hence although I have working code for the Pr , I am sometimes not sure whether it is returning mathematically correct answers or what sympy expects out of the expression !

Kalevi Suominen

unread,
Nov 9, 2021, 9:39:27 AM11/9/21
to sympy
I think that 1/x should be returned in both cases.

Kalevi Suominen
Reply all
Reply to author
Forward
0 new messages