Status: Accepted
Owner: ----
Labels: Type-Defect Priority-Medium Polynomial

New issue 2887 by [email protected]: Bug with minpoly()
http://code.google.com/p/sympy/issues/detail?id=2887

In [43]: minpoly(S("-sqrt(5)/2 - 1/2 + (-sqrt(5)/2 - 1/2)**2"))
---------------------------------------------------------------------------
PolynomialError                           Traceback (most recent call last)
/Users/aaronmeurer/Documents/Python/sympy/sympy/<ipython-input-43-b239f810d715> in <module>()
----> 1 minpoly(S("-sqrt(5)/2 - 1/2 + (-sqrt(5)/2 - 1/2)**2"))

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/numberfields.pyc in minimal_polynomial(ex, x, **args)
    130     else:
    131         F = [x - bottom_up_scan(ex)] + mapping.values()
--> 132         G = groebner(F, symbols.values() + [x], order='lex')
    133
    134         _, factors = factor_list(G[-1])

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/polytools.pyc in groebner(F, *gens, **args)
   5435
   5436     """
-> 5437     return GroebnerBasis(F, *gens, **args)
   5438
   5439 def is_zero_dimensional(F, *gens, **args):

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/polytools.pyc in __new__(cls, F, *gens, **args)
   5462
   5463         try:
-> 5464             polys, opt = parallel_poly_from_expr(F, *gens, **args)
   5465         except PolificationFailed, exc:
   5466             raise ComputationFailed('groebner', len(F), exc)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/polytools.pyc in parallel_poly_from_expr(exprs, *gens, **args)
   3672     """Construct polynomials from expressions. """
   3673     opt = options.build_options(gens, args)
-> 3674     return _parallel_poly_from_expr(exprs, opt)
   3675
   3676 def _parallel_poly_from_expr(exprs, opt):

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/polytools.pyc in _parallel_poly_from_expr(exprs, opt)
   3723
   3724     try:
-> 3725         reps, opt = _parallel_dict_from_expr(exprs, opt)
   3726     except GeneratorsNeeded:
   3727         raise PolificationFailed(opt, origs, exprs, True)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/polyutils.pyc in _parallel_dict_from_expr(exprs, opt)
    276
    277     if opt.gens:
--> 278         reps, gens = _parallel_dict_from_expr_if_gens(exprs, opt)
    279     else:
    280         reps, gens = _parallel_dict_from_expr_no_gens(exprs, opt)

/Users/aaronmeurer/Documents/Python/sympy/sympy/sympy/polys/polyutils.pyc in _parallel_dict_from_expr_if_gens(exprs, opt)
    161                             coeff.append(factor)
    162                         else:
--> 163 raise PolynomialError("%s contains an element of the generators set" % factor)
    164
    165             monom = tuple(monom)

PolynomialError: sqrt(_a1) contains an element of the generators set

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