I'm not sure but I think that could_extract_minus_sign is used for canonicalisation of the sign in an expression:
In [13]: e1 = -((y - x)*z) In [14]: e2 = ((x - y)*z) In [15]: e1 Out[15]: -z⋅(-x + y) In [16]: e2 Out[16]: z⋅(x - y) In [17]: e1.could_extract_minus_sign() Out[17]: True In [18]: e2.could_extract_minus_sign() Out[18]: False The idea is that you can check this method and then (possibly) extract a minus sign in order to place it into a canonical form. The canonical form is useful because equivalent expressions will then be equal. I don't know what the _coeff_isneg function is. On Mon, 10 Aug 2020 at 19:39, Paul Royik <[email protected]> wrote: > > Seems like they do the same thing or no? > In printing _coeff_isneg is used, in other packages could_extract_minus_sign. > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/sympy/b1284654-5ba4-4490-90d0-e535c647d844o%40googlegroups.com. -- 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 [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/sympy/CAHVvXxQ%3DiBTdRJRbK6Ch%3DdtC3b1EcfMReudtPz4Qpzh3xsg__w%40mail.gmail.com.
