Status: New
Owner: ----
Labels: Type-Defect Priority-Medium

New issue 3408 by [email protected]: problem with method simplify()
http://code.google.com/p/sympy/issues/detail?id=3408

Hi,

 I use sympy-0.7.1 and have seen the following strange behaviour :

 I have the following function :


Fx = -0.0563767005092886*(0.000443376026163009*x)**1.0*log(0.00353255046280571*x)/x - 0.0690219365987377*(0.000443376026163009*x)**1.0/x + 0.140515969404209*(0.000443376026163009*x)**2.0/x + 0.0301972630529529*log(0.00353255046280571*x)/x

When I try to apply Fx.simplify(), I get :

Fx.simplify()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
File "/home/landriu/sympy-0.7.1/sympy/core/expr.py", line 1918, in simplify
    return simplify(self)
File "/home/landriu/sympy-0.7.1/sympy/simplify/simplify.py", line 1627, in simplify
    expr = together(cancel(powsimp(expr)).expand())
File "/home/landriu/sympy-0.7.1/sympy/polys/polytools.py", line 5220, in cancel
    c, P, Q = F.cancel(G)
File "/home/landriu/sympy-0.7.1/sympy/polys/polytools.py", line 3022, in cancel
    result = F.cancel(G, include=include)
File "/home/landriu/sympy-0.7.1/sympy/polys/polyclasses.py", line 630, in cancel
    cF, cG, F, G = dmp_cancel(F, G, lev, dom, include=False)
File "/home/landriu/sympy-0.7.1/sympy/polys/euclidtools.py", line 1846, in dmp_cancel
    _, p, q = dmp_inner_gcd(f, g, u, K)
File "/home/landriu/sympy-0.7.1/sympy/polys/euclidtools.py", line 1556, in dmp_inner_gcd
    h, cff, cfg = _dmp_inner_gcd(f, g, u, K)
File "/home/landriu/sympy-0.7.1/sympy/polys/euclidtools.py", line 1522, in _dmp_inner_gcd
    return dmp_ff_prs_gcd(f, g, u, K)
File "/home/landriu/sympy-0.7.1/sympy/polys/euclidtools.py", line 1123, in dmp_ff_prs_gcd
    _, h = dmp_primitive(h, u, K)
File "/home/landriu/sympy-0.7.1/sympy/polys/euclidtools.py", line 1794, in dmp_primitive
    return cont, [ dmp_quo(c, cont, v, K) for c in f ]
File "/home/landriu/sympy-0.7.1/sympy/polys/densearith.py", line 1728, in dmp_quo
    return dmp_div(f, g, u, K)[0]
File "/home/landriu/sympy-0.7.1/sympy/polys/densearith.py", line 1676, in dmp_div
    return dmp_ff_div(f, g, u, K)
File "/home/landriu/sympy-0.7.1/sympy/polys/densearith.py", line 1515, in dmp_ff_div
    raise ZeroDivisionError("polynomial division")
ZeroDivisionError: polynomial division


   If I cut in two parts Fx=Gx+Hx with following definitions :

Gx=-0.0563767005092886*(0.000443376026163009*x)**1.0*log(0.00353255046280571*x)/x - 0.0690219365987377*(0.000443376026163009*x)**1.0/x + 0.140515969404209*(0.000443376026163009*x)**2.0/x

 Hx=0.0301972630529529*log(0.00353255046280571*x)/x

  Gx.simplify() and Hx.simplify() do not show any error, but
(Gx+Hx).simplify() issues the same error message.

 Cheers,

    David Landriu













--
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.

Reply via email to