Status: Accepted
Owner: ondrej.certik
CC: mattpap
Labels: Type-Defect Priority-Medium

New issue 1863 by ondrej.certik: nonlinear solver example stopped working
http://code.google.com/p/sympy/issues/detail?id=1863

This is my example that I usually show:

In [1]: f_1 = x**2 + y + z - 1

In [2]: f_2 = x + y**2 + z - 1

In [3]: f_3 = x + y + z**2 - 1

In [4]: solve([f_1, f_2, f_3], x, y, z)
---------------------------------------------------------------------------
ExactQuotientFailed                       Traceback (most recent call last)

/home/ondrej/repos/sympy/<ipython console> in <module>()

/home/ondrej/repos/sympy/sympy/solvers/solvers.pyc in solve(f, *symbols,
**flags)
    383                 soln = solve_linear_system(matrix, *symbols,
**flags)
    384             else:
--> 385                 soln = solve_poly_system(polys)
    386
    387             # Use swap_dict to ensure we return the same type as
what was


/home/ondrej/repos/sympy/sympy/solvers/polysys.pyc in
solve_poly_system(system, *gens)
    104         raise TypeError("expected iterable container, got %s" %
system)
    105
--> 106     solutions = solve_reduced_system(system, gens, entry=True)
    107
    108     if solutions is None:

/home/ondrej/repos/sympy/sympy/solvers/polysys.pyc in
solve_reduced_system(system, gens, entry)
     55     def solve_reduced_system(system, gens, entry=False):
     56         """Recursively solves reduced polynomial systems. """
---> 57         basis = groebner(system, gens, polys=True)
     58
     59         if len(basis) == 1 and basis[0].is_ground:

/home/ondrej/repos/sympy/sympy/polys/polytools.pyc in groebner(F, *gens,
**args)
   2370         F[i] = sdp_from_dict(f.rep.to_dict(), order)
   2371
-> 2372     G = sdp_groebner(F, lev, order, dom)
   2373
   2374     G = [ Poly(DMP(dict(g), dom, lev), *gens) for g in G ]

/home/ondrej/repos/sympy/sympy/polys/groebnertools.pyc in sdp_groebner(F, u,
O, K)
    620
    621         p = sdp_mul_term(p, (monomial_div(M, p_LM), K.quo(K.one,
sdp_LC(p, K))), u, O, K)
--> 622         q = sdp_mul_term(q, (monomial_div(M, q_LM), K.quo(K.one,
sdp_LC(q, K))), u, O, K)
    623
    624         h = normal(sdp_sub(p, q, u, O, K), G)

/home/ondrej/repos/sympy/sympy/polys/algebratools.pyc in quo(self, a, b)
    462         """Quotient of `a` and `b`, implies `__floordiv__`. """
    463         if a % b:
--> 464             raise ExactQuotientFailed('%s does not divide %s in %s'
% (b, a, self))
    465         else:
    466             return a // b

ExactQuotientFailed: 2 does not divide 1 in ZZ

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