Updates:
Status: Fixed
Comment #1 on issue 2452 by asmeurer: Problem with function evaluation
http://code.google.com/p/sympy/issues/detail?id=2452
Well, I have some good news for you. This has all been fixed in the
development branch, and will be in the next release:
In [24]: f = (x**2 - 4*x -1)/((x - 1)**2 * (x**2 + 1))
In [25]: apart(f, x)
Out[25]:
x - 2 1 2
- ────── + ───── - ────────
2 x - 1 2
x + 1 (x - 1)
In [26]: f
Out[26]:
2
x - 4⋅x - 1
─────────────────
2 ⎛ 2 ⎞
(x - 1) ⋅⎝x + 1⎠
In [27]: ((x - 1)**2 * (x**2 + 1))
Out[27]:
2 ⎛ 2 ⎞
(x - 1) ⋅⎝x + 1⎠
In [28]: ((-1+x)**2 * (x**2 + 1))
Out[28]:
2 ⎛ 2 ⎞
(x - 1) ⋅⎝x + 1⎠
In [29]: ((1 - x)**2 * (x**2 + 1))
Out[29]:
2 ⎛ 2 ⎞
(-x + 1) ⋅⎝x + 1⎠
We have eliminated all automatic minus sign manipulation (with the
exception of automatic distribution of minus signs, issue 1497). Also, if
I am not mistaken, apart() has been completely rewritten with the new polys.
And by the way, your bug reporting is fine. The most important things are
to clearly report what your problem is, give code that can reproduce the
problem, and to mention what version of SymPy you are using and any other
important information (this last item sometimes comes up in a follow up if
we can't reproduce the problem), and you did all of those. The only thing
that you could have done that you didn't do is test it in the latest
development branch (see
https://github.com/sympy/sympy/wiki/Getting-the-bleeding-edge for a guide
on how to do this).
Please let us know about any future problems or suggestions you have.
--
You received this message because you are subscribed to the Google Groups
"sympy-issues" group.
To post to this group, send email to [email protected].
To unsubscribe from this group, send email to
[email protected].
For more options, visit this group at
http://groups.google.com/group/sympy-issues?hl=en.