Updates:
        Status: Started
        Owner: mattpap
        Labels: NeedsReview

Comment #2 on issue 1431 by mattpap: ratsimp improvement
http://code.google.com/p/sympy/issues/detail?id=1431

As ratsimp() is currently redundant, because we have cancel() function for reducing the degree of the numerator and denominator of a rational function, I went ahead and changed behavior of ratsimp() to use cancel() for simplification and polynomial division (actually reduced()) to split the resulting rational function into the
polynomial part and rational function part.

Example:

In [1]: var('F1 Gc x1 xd k')
Out[1]: (F₁, Gc, x₁, xd, k)

In [2]: eq = (F1 + Gc*x1 + Gc*xd + k*x1)/(Gc + k)

In [3]: eq
Out[3]:
F₁ + Gc⋅x₁ + Gc⋅xd + k⋅x₁
─────────────────────────
          Gc + k

In [4]: cancel(_)
Out[4]:
F₁ + Gc⋅x₁ + Gc⋅xd + k⋅x₁
─────────────────────────
          Gc + k

In [5]: ratsimp(_)
Out[5]:
     F₁ + Gc⋅xd
x₁ + ──────────
       Gc + k

(see commit b2b8f97f151524810d8ba0242b7e202b5a738c10 in polys8)

--
You received this message because you are listed in the owner
or CC fields of this issue, or because you starred this issue.
You may adjust your issue notification preferences at:
http://code.google.com/hosting/settings

--
You received this message because you are subscribed to the Google Groups 
"sympy-issues" group.
To post to this group, send email to sympy-iss...@googlegroups.com.
To unsubscribe from this group, send email to 
sympy-issues+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/sympy-issues?hl=en.

Reply via email to