On 25 February 2016 at 15:30, Oscar Benjamin <oscar.j.benja...@gmail.com> wrote: > On 25 February 2016 at 10:44, Yingchi Li <liying...@gmail.com> wrote: >> >> I have found a bug in factor() and simplify() >> please look at the image below >> >> the correct answer is q2 + 0.1 > > Looks like a recent regression since I don't see it with 0.7.1 but I > do with master:
I traced this to here: In [1]: expr = x*sin(y)**2 + x*cos(y)**2 + 0.1*sin(y)**2 + 0.1*cos(y)**2 In [2]: p = Poly(expr, x, cos(y), sin(y), domain='RR') In [3]: p Out[3]: Poly(1.0*x*cos(y)**2 + 1.0*x*sin(y)**2 + 0.1*cos(y)**2 + 0.1*sin(y)**2, x, cos(y), sin(y), domain='RR') In [4]: p.rep Out[4]: DMP([[[1.0], [], [1.0, 0.0, 0.0]], [[0.1], [], [0.1, 0.0, 0.0]]], RR, None) In [5]: p.rep.factor_list() Out[5]: (1.0, [(DMP([[[0.1], [], [0.1, 0.0, 0.0]]], RR, None), 1), (DMP([[[1.0]], [[0.1]]], RR, None), 1)]) I think the bug is in there somehow but I have no idea what it means. What is p.rep and how do you interpret it? -- Oscar -- You received this message because you are subscribed to the Google Groups "sympy" group. To unsubscribe from this group and stop receiving emails from it, send an email to sympy+unsubscr...@googlegroups.com. To post to this group, send email to sympy@googlegroups.com. Visit this group at https://groups.google.com/group/sympy. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHVvXxTc6KYEwEBP1GqN5eh-W0JgmsGxLD8DpR1HCAzD29%3DTEw%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.